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

Unified Diff: src/top.cc

Issue 8101: Posponed the setting of "external_caught_exception" to when leaving JavaScrip... (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
Index: src/top.cc
===================================================================
--- src/top.cc (revision 567)
+++ src/top.cc (working copy)
@@ -101,6 +101,7 @@
clear_pending_exception();
clear_scheduled_exception();
thread_local_.save_context_ = NULL;
+ thread_local_.catcher_ = NULL;
}
@@ -606,11 +607,6 @@
Failure* Top::ReThrow(Object* exception, MessageLocation* location) {
- // Check is this exception is externally caught.
- bool is_caught_externally = false;
- ShouldReportException(&is_caught_externally);
- thread_local_.external_caught_exception_ = is_caught_externally;
-
// Set the exception beeing re-thrown.
Kasper Lund 2008/10/23 12:52:43 beeing sb. being
set_pending_exception(exception);
return Failure::Exception();
@@ -793,7 +789,9 @@
// If the exception is caught externally, we store it in the
// try/catch handler. The C code can find it later and process it if
// necessary.
+ thread_local_.catcher_ = NULL;
if (is_caught_externally) {
+ thread_local_.catcher_ = thread_local_.try_catch_handler_;
thread_local_.try_catch_handler_->exception_ =
reinterpret_cast<void*>(*exception_handle);
if (!message_obj.is_null()) {
@@ -812,7 +810,6 @@
MessageHandler::ReportMessage(location, message_obj);
}
}
- thread_local_.external_caught_exception_ = is_caught_externally;
// NOTE: Notifying the debugger or reporting the exception may have caused
// new exceptions. For now, we just ignore that and set the pending exception

Powered by Google App Engine
This is Rietveld 408576698