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

Unified Diff: runtime/vm/isolate.cc

Issue 2180613002: vm-service: Include pauseEvent even when running without debugger support. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: parens Created 4 years, 5 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 | « runtime/observatory/lib/src/service/object.dart ('k') | runtime/vm/service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/isolate.cc
diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc
index d8bdc5e528d7df1aa26132b15470c7dd3ecee598..7d01223fe84a15eff4b2bc89f94da939ab0ee392 100644
--- a/runtime/vm/isolate.cc
+++ b/runtime/vm/isolate.cc
@@ -1930,36 +1930,35 @@ void Isolate::PrintJSON(JSONStream* stream, bool ref) {
jsobj.AddProperty("pauseOnExit", message_handler()->should_pause_on_exit());
jsobj.AddProperty("_isReloading", IsReloading());
- if (debugger() != NULL) {
- if (!is_runnable()) {
- // Isolate is not yet runnable.
- ASSERT(debugger()->PauseEvent() == NULL);
- ServiceEvent pause_event(this, ServiceEvent::kNone);
- jsobj.AddProperty("pauseEvent", &pause_event);
- } else if (message_handler()->is_paused_on_start() ||
- message_handler()->should_pause_on_start()) {
- ASSERT(debugger()->PauseEvent() == NULL);
- ServiceEvent pause_event(this, ServiceEvent::kPauseStart);
- jsobj.AddProperty("pauseEvent", &pause_event);
- } else if (message_handler()->is_paused_on_exit()) {
- ASSERT(debugger()->PauseEvent() == NULL);
- ServiceEvent pause_event(this, ServiceEvent::kPauseExit);
- jsobj.AddProperty("pauseEvent", &pause_event);
- } else if (debugger()->PauseEvent() != NULL && !resume_request_) {
- jsobj.AddProperty("pauseEvent", debugger()->PauseEvent());
- } else {
- ServiceEvent pause_event(this, ServiceEvent::kResume);
+ if (!is_runnable()) {
+ // Isolate is not yet runnable.
+ ASSERT((debugger() == NULL) || (debugger()->PauseEvent() == NULL));
+ ServiceEvent pause_event(this, ServiceEvent::kNone);
+ jsobj.AddProperty("pauseEvent", &pause_event);
+ } else if (message_handler()->is_paused_on_start() ||
+ message_handler()->should_pause_on_start()) {
+ ASSERT((debugger() == NULL) || (debugger()->PauseEvent() == NULL));
+ ServiceEvent pause_event(this, ServiceEvent::kPauseStart);
+ jsobj.AddProperty("pauseEvent", &pause_event);
+ } else if (message_handler()->is_paused_on_exit()) {
+ ASSERT((debugger() == NULL) || (debugger()->PauseEvent() == NULL));
+ ServiceEvent pause_event(this, ServiceEvent::kPauseExit);
+ jsobj.AddProperty("pauseEvent", &pause_event);
+ } else if ((debugger() != NULL) &&
+ (debugger()->PauseEvent() != NULL) &&
+ !resume_request_) {
+ jsobj.AddProperty("pauseEvent", debugger()->PauseEvent());
+ } else {
+ ServiceEvent pause_event(this, ServiceEvent::kResume);
+ if (debugger() != NULL) {
// TODO(turnidge): Don't compute a full stack trace.
DebuggerStackTrace* stack = debugger()->StackTrace();
if (stack->Length() > 0) {
pause_event.set_top_frame(stack->FrameAt(0));
}
- jsobj.AddProperty("pauseEvent", &pause_event);
}
-
- jsobj.AddProperty("exceptionPauseMode",
- ExceptionPauseInfoToServiceEnum(debugger()->GetExceptionPauseInfo()));
+ jsobj.AddProperty("pauseEvent", &pause_event);
}
const Library& lib =
@@ -2003,9 +2002,15 @@ void Isolate::PrintJSON(JSONStream* stream, bool ref) {
}
}
+ Dart_ExceptionPauseInfo pause_info = (debugger() != NULL)
+ ? debugger()->GetExceptionPauseInfo()
+ : kNoPauseOnExceptions;
+ jsobj.AddProperty("exceptionPauseMode",
+ ExceptionPauseInfoToServiceEnum(pause_info));
+
if (debugger() != NULL) {
- JSONObject jssettings(&jsobj, "_debuggerSettings");
- debugger()->PrintSettingsToJSONObject(&jssettings);
+ JSONObject settings(&jsobj, "_debuggerSettings");
+ debugger()->PrintSettingsToJSONObject(&settings);
}
{
« no previous file with comments | « runtime/observatory/lib/src/service/object.dart ('k') | runtime/vm/service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698