Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: src/isolate.cc

Issue 2381773003: Add a flag for aborting on stack overflow. (Closed)
Patch Set: Address comment Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/flag-definitions.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/isolate.h" 5 #include "src/isolate.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 8
9 #include <fstream> // NOLINT(readability/streams) 9 #include <fstream> // NOLINT(readability/streams)
10 #include <sstream> 10 #include <sstream>
(...skipping 907 matching lines...) Expand 10 before | Expand all | Expand 10 after
918 { 918 {
919 // Leaving JavaScript. 919 // Leaving JavaScript.
920 VMState<EXTERNAL> state(this); 920 VMState<EXTERNAL> state(this);
921 return callback(v8::Utils::ToLocal(accessing_context), 921 return callback(v8::Utils::ToLocal(accessing_context),
922 v8::Utils::ToLocal(receiver), v8::Utils::ToLocal(data)); 922 v8::Utils::ToLocal(receiver), v8::Utils::ToLocal(data));
923 } 923 }
924 } 924 }
925 925
926 926
927 Object* Isolate::StackOverflow() { 927 Object* Isolate::StackOverflow() {
928 if (FLAG_abort_on_stack_overflow) {
929 FATAL("Aborting on stack overflow");
930 }
931
928 DisallowJavascriptExecution no_js(this); 932 DisallowJavascriptExecution no_js(this);
929 HandleScope scope(this); 933 HandleScope scope(this);
930 934
931 Handle<JSFunction> fun = range_error_function(); 935 Handle<JSFunction> fun = range_error_function();
932 Handle<Object> msg = factory()->NewStringFromAsciiChecked( 936 Handle<Object> msg = factory()->NewStringFromAsciiChecked(
933 MessageTemplate::TemplateString(MessageTemplate::kStackOverflow)); 937 MessageTemplate::TemplateString(MessageTemplate::kStackOverflow));
934 Handle<Object> no_caller; 938 Handle<Object> no_caller;
935 Handle<Object> exception; 939 Handle<Object> exception;
936 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( 940 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
937 this, exception, 941 this, exception,
(...skipping 2353 matching lines...) Expand 10 before | Expand all | Expand 10 after
3291 // Then check whether this scope intercepts. 3295 // Then check whether this scope intercepts.
3292 if ((flag & intercept_mask_)) { 3296 if ((flag & intercept_mask_)) {
3293 intercepted_flags_ |= flag; 3297 intercepted_flags_ |= flag;
3294 return true; 3298 return true;
3295 } 3299 }
3296 return false; 3300 return false;
3297 } 3301 }
3298 3302
3299 } // namespace internal 3303 } // namespace internal
3300 } // namespace v8 3304 } // namespace v8
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698