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

Unified Diff: src/top.h

Issue 8102: Cleanup of http://codereview.chromium.org/8101.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/execution.cc ('k') | src/top.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/top.h
===================================================================
--- src/top.h (revision 570)
+++ src/top.h (working copy)
@@ -53,7 +53,9 @@
bool external_caught_exception_;
v8::TryCatch* try_catch_handler_;
SaveContext* save_context_;
- v8::TryCatch* catcher_;
+ // Flag indicating that the try_catch_handler_ contains an exception to be
+ // caught.
+ bool pending_external_caught_exception_;
// Stack.
Address c_entry_fp_; // the frame pointer of the top c entry frame
@@ -144,10 +146,20 @@
thread_local_.scheduled_exception_ = Heap::the_hole_value();
}
- static void setup_external_caught() {
- thread_local_.external_caught_exception_ =
- (thread_local_.catcher_ != NULL) &&
- (Top::thread_local_.try_catch_handler_ == Top::thread_local_.catcher_);
+ // Propagate the external caught exception flag. If there is no external
+ // caught exception always clear the TryCatch handler as it might contain
+ // an exception object from a throw which was bypassed by a finally block
+ // doing an explicit return/break/continue.
+ static void propagate_external_caught() {
+ if (has_pending_exception()) {
+ thread_local_.external_caught_exception_ =
+ thread_local_.pending_external_caught_exception_;
+ } else {
+ if (thread_local_.try_catch_handler_ != NULL) {
+ thread_local_.try_catch_handler_->Reset();
+ }
+ }
+ thread_local_.pending_external_caught_exception_ = false;
}
// Tells whether the current context has experienced an out of memory
« no previous file with comments | « src/execution.cc ('k') | src/top.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698