OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
808 | 808 |
809 | 809 |
810 Object* Isolate::StackOverflow() { | 810 Object* Isolate::StackOverflow() { |
811 HandleScope scope(this); | 811 HandleScope scope(this); |
812 // At this point we cannot create an Error object using its javascript | 812 // At this point we cannot create an Error object using its javascript |
813 // constructor. Instead, we copy the pre-constructed boilerplate and | 813 // constructor. Instead, we copy the pre-constructed boilerplate and |
814 // attach the stack trace as a hidden property. | 814 // attach the stack trace as a hidden property. |
815 Handle<String> key = factory()->stack_overflow_string(); | 815 Handle<String> key = factory()->stack_overflow_string(); |
816 Handle<JSObject> boilerplate = Handle<JSObject>::cast( | 816 Handle<JSObject> boilerplate = Handle<JSObject>::cast( |
817 Object::GetProperty(js_builtins_object(), key).ToHandleChecked()); | 817 Object::GetProperty(js_builtins_object(), key).ToHandleChecked()); |
818 Handle<JSObject> exception = JSObject::Copy(boilerplate); | 818 Handle<JSObject> exception = factory()->CopyJSObject(boilerplate); |
819 DoThrow(*exception, NULL); | 819 DoThrow(*exception, NULL); |
820 | 820 |
821 // Get stack trace limit. | 821 // Get stack trace limit. |
822 Handle<Object> error = Object::GetProperty( | 822 Handle<Object> error = Object::GetProperty( |
823 this, js_builtins_object(), "$Error").ToHandleChecked(); | 823 this, js_builtins_object(), "$Error").ToHandleChecked(); |
824 if (!error->IsJSObject()) return heap()->exception(); | 824 if (!error->IsJSObject()) return heap()->exception(); |
825 | 825 |
826 Handle<String> stackTraceLimit = | 826 Handle<String> stackTraceLimit = |
827 factory()->InternalizeUtf8String("stackTraceLimit"); | 827 factory()->InternalizeUtf8String("stackTraceLimit"); |
828 ASSERT(!stackTraceLimit.is_null()); | 828 ASSERT(!stackTraceLimit.is_null()); |
(...skipping 1441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2270 handle_scope_implementer()->IncrementCallDepth(); | 2270 handle_scope_implementer()->IncrementCallDepth(); |
2271 if (run_microtasks) Execution::RunMicrotasks(this); | 2271 if (run_microtasks) Execution::RunMicrotasks(this); |
2272 for (int i = 0; i < call_completed_callbacks_.length(); i++) { | 2272 for (int i = 0; i < call_completed_callbacks_.length(); i++) { |
2273 call_completed_callbacks_.at(i)(); | 2273 call_completed_callbacks_.at(i)(); |
2274 } | 2274 } |
2275 handle_scope_implementer()->DecrementCallDepth(); | 2275 handle_scope_implementer()->DecrementCallDepth(); |
2276 } | 2276 } |
2277 | 2277 |
2278 | 2278 |
2279 } } // namespace v8::internal | 2279 } } // namespace v8::internal |
OLD | NEW |