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 <stdlib.h> | 5 #include <stdlib.h> |
6 | 6 |
7 #include "v8.h" | 7 #include "v8.h" |
8 | 8 |
9 #include "ast.h" | 9 #include "ast.h" |
10 #include "bootstrapper.h" | 10 #include "bootstrapper.h" |
(...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
785 | 785 |
786 | 786 |
787 Object* Isolate::StackOverflow() { | 787 Object* Isolate::StackOverflow() { |
788 HandleScope scope(this); | 788 HandleScope scope(this); |
789 // At this point we cannot create an Error object using its javascript | 789 // At this point we cannot create an Error object using its javascript |
790 // constructor. Instead, we copy the pre-constructed boilerplate and | 790 // constructor. Instead, we copy the pre-constructed boilerplate and |
791 // attach the stack trace as a hidden property. | 791 // attach the stack trace as a hidden property. |
792 Handle<String> key = factory()->stack_overflow_string(); | 792 Handle<String> key = factory()->stack_overflow_string(); |
793 Handle<JSObject> boilerplate = Handle<JSObject>::cast( | 793 Handle<JSObject> boilerplate = Handle<JSObject>::cast( |
794 Object::GetProperty(js_builtins_object(), key).ToHandleChecked()); | 794 Object::GetProperty(js_builtins_object(), key).ToHandleChecked()); |
795 Handle<JSObject> exception = JSObject::Copy(boilerplate); | 795 Handle<JSObject> exception = factory()->CopyJSObject(boilerplate); |
796 DoThrow(*exception, NULL); | 796 DoThrow(*exception, NULL); |
797 | 797 |
798 // Get stack trace limit. | 798 // Get stack trace limit. |
799 Handle<Object> error = Object::GetProperty( | 799 Handle<Object> error = Object::GetProperty( |
800 this, js_builtins_object(), "$Error").ToHandleChecked(); | 800 this, js_builtins_object(), "$Error").ToHandleChecked(); |
801 if (!error->IsJSObject()) return heap()->exception(); | 801 if (!error->IsJSObject()) return heap()->exception(); |
802 | 802 |
803 Handle<String> stackTraceLimit = | 803 Handle<String> stackTraceLimit = |
804 factory()->InternalizeUtf8String("stackTraceLimit"); | 804 factory()->InternalizeUtf8String("stackTraceLimit"); |
805 ASSERT(!stackTraceLimit.is_null()); | 805 ASSERT(!stackTraceLimit.is_null()); |
(...skipping 1441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2247 handle_scope_implementer()->IncrementCallDepth(); | 2247 handle_scope_implementer()->IncrementCallDepth(); |
2248 if (run_microtasks) Execution::RunMicrotasks(this); | 2248 if (run_microtasks) Execution::RunMicrotasks(this); |
2249 for (int i = 0; i < call_completed_callbacks_.length(); i++) { | 2249 for (int i = 0; i < call_completed_callbacks_.length(); i++) { |
2250 call_completed_callbacks_.at(i)(); | 2250 call_completed_callbacks_.at(i)(); |
2251 } | 2251 } |
2252 handle_scope_implementer()->DecrementCallDepth(); | 2252 handle_scope_implementer()->DecrementCallDepth(); |
2253 } | 2253 } |
2254 | 2254 |
2255 | 2255 |
2256 } } // namespace v8::internal | 2256 } } // namespace v8::internal |
OLD | NEW |