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

Unified Diff: runtime/vm/service.cc

Issue 1665773004: Add necessary support functions so that embedders can implemented pause on start and exit (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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/vm/message_handler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/service.cc
diff --git a/runtime/vm/service.cc b/runtime/vm/service.cc
index 24c159842a07daf34ab5c95b57c30f583b0993d6..595083f8ae0f427d6a09720575a3456d5d460f33 100644
--- a/runtime/vm/service.cc
+++ b/runtime/vm/service.cc
@@ -2958,14 +2958,14 @@ static const MethodParameter* resume_params[] = {
static bool Resume(Thread* thread, JSONStream* js) {
const char* step_param = js->LookupParam("step");
Isolate* isolate = thread->isolate();
- if (isolate->message_handler()->paused_on_start()) {
+ if (isolate->message_handler()->is_paused_on_start()) {
// If the user is issuing a 'Over' or an 'Out' step, that is the
// same as a regular resume request.
if ((step_param != NULL) && (strcmp(step_param, "Into") == 0)) {
isolate->debugger()->EnterSingleStepMode();
}
- isolate->message_handler()->set_pause_on_start(false);
- isolate->set_last_resume_timestamp();
+ isolate->message_handler()->set_should_pause_on_start(false);
+ isolate->SetResumeRequest();
if (Service::debug_stream.enabled()) {
ServiceEvent event(isolate, ServiceEvent::kResume);
Service::HandleEvent(&event);
@@ -2973,8 +2973,9 @@ static bool Resume(Thread* thread, JSONStream* js) {
PrintSuccess(js);
return true;
}
- if (isolate->message_handler()->paused_on_exit()) {
- isolate->message_handler()->set_pause_on_exit(false);
+ if (isolate->message_handler()->is_paused_on_exit()) {
+ isolate->message_handler()->set_should_pause_on_exit(false);
+ isolate->SetResumeRequest();
// We don't send a resume event because we will be exiting.
PrintSuccess(js);
return true;
@@ -2992,7 +2993,7 @@ static bool Resume(Thread* thread, JSONStream* js) {
return true;
}
}
- isolate->Resume();
+ isolate->SetResumeRequest();
PrintSuccess(js);
return true;
}
« no previous file with comments | « runtime/vm/message_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698