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

Unified Diff: runtime/vm/service.cc

Issue 2070873002: Bug fixes for hot reload (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: fix an error message Created 4 years, 6 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/object_reload.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 087e47e5199862243e51f0268d63bcf0648c7c43..09da5f340d51005005f913c51736fd27b68819f3 100644
--- a/runtime/vm/service.cc
+++ b/runtime/vm/service.cc
@@ -2484,19 +2484,24 @@ static bool ReloadSources(Thread* thread, JSONStream* js) {
"This isolate is being reloaded.");
return true;
}
- DebuggerStackTrace* stack = isolate->debugger()->StackTrace();
- ASSERT(isolate->CanReload());
-
- if (stack->Length() > 0) {
- // TODO(turnidge): We need to support this case.
+ if (!isolate->CanReload()) {
js->PrintError(kFeatureDisabled,
- "Source can only be reloaded when stack is empty.");
+ "This isolate cannot reload sources right now.");
return true;
- } else {
- isolate->ReloadSources();
}
- PrintSuccess(js);
+ isolate->ReloadSources();
+
+ const Error& error = Error::Handle(isolate->sticky_reload_error());
+
+ if (error.IsNull()) {
+ PrintSuccess(js);
+ } else {
+ // Clear the sticky error.
+ isolate->clear_sticky_reload_error();
+ js->PrintError(kIsolateReloadFailed,
+ "Isolate reload failed: %s", error.ToErrorCString());
+ }
return true;
Florian Schneider 2016/06/16 17:30:00 This function never seems to return false. Is the
Cutch 2016/06/16 18:02:26 A service protocol handler can return false if the
}
« no previous file with comments | « runtime/vm/object_reload.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698