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

Unified Diff: runtime/vm/isolate.cc

Issue 2411153002: Make reloadSources service RPC public (Closed)
Patch Set: turnidge review Created 4 years, 2 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/isolate.h ('k') | runtime/vm/service.h » ('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 50353e820c9f0d1821531bb861e8ff3464d07864..f058cd9f7d20daed7abd881810e164c67439e688 100644
--- a/runtime/vm/isolate.cc
+++ b/runtime/vm/isolate.cc
@@ -847,7 +847,8 @@ Isolate::Isolate(const Dart_IsolateFlags& api_flags)
no_reload_scope_depth_(0),
reload_every_n_stack_overflow_checks_(FLAG_reload_every),
reload_context_(NULL),
- last_reload_timestamp_(OS::GetCurrentTimeMillis()) {
+ last_reload_timestamp_(OS::GetCurrentTimeMillis()),
+ should_pause_post_service_request_(false) {
NOT_IN_PRODUCT(FlagsCopyFrom(api_flags));
// TODO(asiva): A Thread is not available here, need to figure out
// how the vm_tag (kEmbedderTagId) can be set, these tags need to
@@ -1048,6 +1049,23 @@ void Isolate::set_debugger_name(const char* name) {
}
+bool Isolate::IsPaused() const {
+ return (debugger_ != NULL) && (debugger_->PauseEvent() != NULL);
+}
+
+
+void Isolate::PausePostRequest() {
+ if (debugger_ == NULL) {
+ return;
+ }
+ ASSERT(!IsPaused());
+ const Error& error = Error::Handle(debugger_->PausePostRequest());
+ if (!error.IsNull()) {
+ Exceptions::PropagateError(error);
+ }
+}
+
+
void Isolate::BuildName(const char* name_prefix) {
ASSERT(name_ == NULL);
if (name_prefix == NULL) {
@@ -2002,8 +2020,8 @@ void Isolate::PrintJSON(JSONStream* stream, bool ref) {
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));
+ } else if (message_handler()->is_paused_on_exit() &&
+ ((debugger() == NULL) || (debugger()->PauseEvent() == NULL))) {
ServiceEvent pause_event(this, ServiceEvent::kPauseExit);
jsobj.AddProperty("pauseEvent", &pause_event);
} else if ((debugger() != NULL) &&
« no previous file with comments | « runtime/vm/isolate.h ('k') | runtime/vm/service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698