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 867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
878 Object* Isolate::ThrowInvalidStringLength() { | 878 Object* Isolate::ThrowInvalidStringLength() { |
879 return Throw(*factory()->NewRangeError( | 879 return Throw(*factory()->NewRangeError( |
880 "invalid_string_length", HandleVector<Object>(NULL, 0))); | 880 "invalid_string_length", HandleVector<Object>(NULL, 0))); |
881 } | 881 } |
882 | 882 |
883 | 883 |
884 void Isolate::ScheduleThrow(Object* exception) { | 884 void Isolate::ScheduleThrow(Object* exception) { |
885 // When scheduling a throw we first throw the exception to get the | 885 // When scheduling a throw we first throw the exception to get the |
886 // error reporting if it is uncaught before rescheduling it. | 886 // error reporting if it is uncaught before rescheduling it. |
887 Throw(exception); | 887 Throw(exception); |
888 PropagatePendingExceptionToExternalTryCatch(); | 888 OptionalRescheduleException(false); |
889 if (has_pending_exception()) { | 889 if (has_pending_exception()) { |
890 thread_local_top()->scheduled_exception_ = pending_exception(); | 890 thread_local_top()->scheduled_exception_ = pending_exception(); |
891 thread_local_top()->external_caught_exception_ = false; | 891 thread_local_top()->external_caught_exception_ = false; |
892 clear_pending_exception(); | 892 clear_pending_exception(); |
893 } | 893 } |
894 } | 894 } |
895 | 895 |
896 | 896 |
897 void Isolate::RestorePendingMessageFromTryCatch(v8::TryCatch* handler) { | 897 void Isolate::RestorePendingMessageFromTryCatch(v8::TryCatch* handler) { |
898 ASSERT(handler == try_catch_handler()); | 898 ASSERT(handler == try_catch_handler()); |
(...skipping 1354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2253 ASSERT(handle_scope_implementer()->CallDepthIsZero()); | 2253 ASSERT(handle_scope_implementer()->CallDepthIsZero()); |
2254 | 2254 |
2255 // Increase call depth to prevent recursive callbacks. | 2255 // Increase call depth to prevent recursive callbacks. |
2256 handle_scope_implementer()->IncrementCallDepth(); | 2256 handle_scope_implementer()->IncrementCallDepth(); |
2257 Execution::RunMicrotasks(this); | 2257 Execution::RunMicrotasks(this); |
2258 handle_scope_implementer()->DecrementCallDepth(); | 2258 handle_scope_implementer()->DecrementCallDepth(); |
2259 } | 2259 } |
2260 | 2260 |
2261 | 2261 |
2262 } } // namespace v8::internal | 2262 } } // namespace v8::internal |
OLD | NEW |