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

Unified Diff: src/isolate.cc

Issue 553043002: Fix crash in ScriptDebugServer::wrapCallFrames (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fix Created 6 years, 3 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 | « no previous file | test/cctest/test-debug.cc » ('j') | test/cctest/test-debug.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/isolate.cc
diff --git a/src/isolate.cc b/src/isolate.cc
index 5e862874a15626056f67b8686ed5cf5df1279319..708f57712326603702a239c277befd363b536173 100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -1029,9 +1029,13 @@ void Isolate::DoThrow(Object* exception, MessageLocation* location) {
thread_local_top()->rethrowing_message_ = false;
- // Notify debugger of exception.
+ // Notify debugger of exception. Temporarily clear any scheduled_exception
+ // to allow evaluating JavaScript from the debug event handler.
if (catchable_by_javascript) {
+ Object* saved_scheduled_exception = scheduled_exception();
+ clear_scheduled_exception();
Yang 2014/09/10 14:46:13 Can we put this into OnThrow?
aandrey 2014/09/11 05:48:29 Done.
debug()->OnThrow(exception_handle, report_exception);
+ thread_local_top()->scheduled_exception_ = saved_scheduled_exception;
}
// Generate the message if required.
« no previous file with comments | « no previous file | test/cctest/test-debug.cc » ('j') | test/cctest/test-debug.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698