| OLD | NEW |
| 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 878 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 889 | 889 |
| 890 { | 890 { |
| 891 // Leaving JavaScript. | 891 // Leaving JavaScript. |
| 892 VMState<EXTERNAL> state(this); | 892 VMState<EXTERNAL> state(this); |
| 893 return callback(v8::Utils::ToLocal(accessing_context), | 893 return callback(v8::Utils::ToLocal(accessing_context), |
| 894 v8::Utils::ToLocal(receiver), v8::Utils::ToLocal(data)); | 894 v8::Utils::ToLocal(receiver), v8::Utils::ToLocal(data)); |
| 895 } | 895 } |
| 896 } | 896 } |
| 897 | 897 |
| 898 | 898 |
| 899 const char* const Isolate::kStackOverflowMessage = | |
| 900 "Uncaught RangeError: Maximum call stack size exceeded"; | |
| 901 | |
| 902 | |
| 903 Object* Isolate::StackOverflow() { | 899 Object* Isolate::StackOverflow() { |
| 904 HandleScope scope(this); | 900 HandleScope scope(this); |
| 905 // At this point we cannot create an Error object using its javascript | 901 // At this point we cannot create an Error object using its javascript |
| 906 // constructor. Instead, we copy the pre-constructed boilerplate and | 902 // constructor. Instead, we copy the pre-constructed boilerplate and |
| 907 // attach the stack trace as a hidden property. | 903 // attach the stack trace as a hidden property. |
| 908 Handle<Object> exception; | 904 Handle<Object> exception; |
| 909 if (bootstrapper()->IsActive()) { | 905 if (bootstrapper()->IsActive()) { |
| 910 // There is no boilerplate to use during bootstrapping. | 906 // There is no boilerplate to use during bootstrapping. |
| 911 exception = factory()->NewStringFromAsciiChecked( | 907 exception = factory()->NewStringFromAsciiChecked( |
| 912 MessageTemplate::TemplateString(MessageTemplate::kStackOverflow)); | 908 MessageTemplate::TemplateString(MessageTemplate::kStackOverflow)); |
| (...skipping 2152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3065 // Then check whether this scope intercepts. | 3061 // Then check whether this scope intercepts. |
| 3066 if ((flag & intercept_mask_)) { | 3062 if ((flag & intercept_mask_)) { |
| 3067 intercepted_flags_ |= flag; | 3063 intercepted_flags_ |= flag; |
| 3068 return true; | 3064 return true; |
| 3069 } | 3065 } |
| 3070 return false; | 3066 return false; |
| 3071 } | 3067 } |
| 3072 | 3068 |
| 3073 } // namespace internal | 3069 } // namespace internal |
| 3074 } // namespace v8 | 3070 } // namespace v8 |
| OLD | NEW |