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

Unified Diff: src/debug.cc

Issue 13384: Continue running if failing to make a debug event into a JSON event for sendi... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 years 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/debug.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug.cc
===================================================================
--- src/debug.cc (revision 959)
+++ src/debug.cc (working copy)
@@ -1701,7 +1701,7 @@
}
-void DebugMessageThread::SetEventJSONFromEvent(Handle<Object> event_data) {
+bool DebugMessageThread::SetEventJSONFromEvent(Handle<Object> event_data) {
v8::HandleScope scope;
// Call toJSONProtocol on the debug event object.
v8::Local<v8::Object> api_event_data =
@@ -1727,8 +1727,9 @@
}
} else {
PrintLn(try_catch.Exception());
- SendMessage(Vector<uint16_t>::empty());
+ return false;
}
+ return true;
}
@@ -1791,10 +1792,14 @@
}
// Notify the debugger that a debug event has occurred.
- host_running_ = false;
- SetEventJSONFromEvent(event_data);
+ bool success = SetEventJSONFromEvent(event_data);
+ if (!success) {
+ // If failed to notify debugger just continue running.
+ return;
+ }
// Wait for requests from the debugger.
+ host_running_ = false;
while (true) {
command_received_->Wait();
Logger::DebugTag("Got request from command queue, in interactive loop.");
« no previous file with comments | « src/debug.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698