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

Unified Diff: src/top.cc

Issue 42117: Revert the exception propagation fix. It leads to crashes because... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 9 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/top.h ('k') | test/cctest/cctest.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/top.cc
===================================================================
--- src/top.cc (revision 1495)
+++ src/top.cc (working copy)
@@ -823,36 +823,16 @@
bool Top::optional_reschedule_exception(bool is_bottom_call) {
- // Allways reschedule out of memory exceptions.
- if (!is_out_of_memory()) {
- // Never reschedule the exception if this is the bottom call.
- bool clear_exception = is_bottom_call;
-
- // If the exception is externally caught, clear it if there are no
- // JavaScript frames on the way to the C++ frame that has the
- // external handler.
- if (thread_local_.external_caught_exception_) {
- ASSERT(thread_local_.try_catch_handler_ != NULL);
- Address external_handler_address =
- reinterpret_cast<Address>(thread_local_.try_catch_handler_);
- JavaScriptFrameIterator it;
- if (it.done() || (it.frame()->sp() > external_handler_address)) {
- clear_exception = true;
- }
- }
-
- // Clear the exception if needed.
- if (clear_exception) {
- thread_local_.external_caught_exception_ = false;
- clear_pending_exception();
- return false;
- }
+ if (!is_out_of_memory() &&
+ (thread_local_.external_caught_exception_ || is_bottom_call)) {
+ thread_local_.external_caught_exception_ = false;
+ clear_pending_exception();
+ return false;
+ } else {
+ thread_local_.scheduled_exception_ = pending_exception();
+ clear_pending_exception();
+ return true;
}
-
- // Reschedule the exception.
- thread_local_.scheduled_exception_ = pending_exception();
- clear_pending_exception();
- return true;
}
« no previous file with comments | « src/top.h ('k') | test/cctest/cctest.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698