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 865 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
876 Object* Isolate::ThrowInvalidStringLength() { | 876 Object* Isolate::ThrowInvalidStringLength() { |
877 return Throw(*factory()->NewRangeError( | 877 return Throw(*factory()->NewRangeError( |
878 "invalid_string_length", HandleVector<Object>(NULL, 0))); | 878 "invalid_string_length", HandleVector<Object>(NULL, 0))); |
879 } | 879 } |
880 | 880 |
881 | 881 |
882 void Isolate::ScheduleThrow(Object* exception) { | 882 void Isolate::ScheduleThrow(Object* exception) { |
883 // When scheduling a throw we first throw the exception to get the | 883 // When scheduling a throw we first throw the exception to get the |
884 // error reporting if it is uncaught before rescheduling it. | 884 // error reporting if it is uncaught before rescheduling it. |
885 Throw(exception); | 885 Throw(exception); |
886 OptionalRescheduleException(false); | 886 PropagatePendingExceptionToExternalTryCatch(); |
887 if (has_pending_exception()) { | 887 if (has_pending_exception()) { |
888 thread_local_top()->scheduled_exception_ = pending_exception(); | 888 thread_local_top()->scheduled_exception_ = pending_exception(); |
889 thread_local_top()->external_caught_exception_ = false; | 889 thread_local_top()->external_caught_exception_ = false; |
890 clear_pending_exception(); | 890 clear_pending_exception(); |
891 } | 891 } |
892 } | 892 } |
893 | 893 |
894 | 894 |
895 void Isolate::RestorePendingMessageFromTryCatch(v8::TryCatch* handler) { | 895 void Isolate::RestorePendingMessageFromTryCatch(v8::TryCatch* handler) { |
896 ASSERT(handler == try_catch_handler()); | 896 ASSERT(handler == try_catch_handler()); |
(...skipping 1388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2285 Execution::Call(this, microtask, factory()->undefined_value(), | 2285 Execution::Call(this, microtask, factory()->undefined_value(), |
2286 0, NULL).Check(); | 2286 0, NULL).Check(); |
2287 } | 2287 } |
2288 } | 2288 } |
2289 | 2289 |
2290 handle_scope_implementer()->DecrementCallDepth(); | 2290 handle_scope_implementer()->DecrementCallDepth(); |
2291 } | 2291 } |
2292 | 2292 |
2293 | 2293 |
2294 } } // namespace v8::internal | 2294 } } // namespace v8::internal |
OLD | NEW |