Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(564)

Side by Side Diff: src/isolate.cc

Issue 293123003: Revert "Make v8::TryCatch able to consume natively thrown exceptions." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | test/cctest/test-api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698