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

Unified Diff: runtime/vm/isolate_reload.cc

Issue 2200233002: Fix top level parse error reload test (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 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 | « no previous file | runtime/vm/object_reload.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/isolate_reload.cc
diff --git a/runtime/vm/isolate_reload.cc b/runtime/vm/isolate_reload.cc
index 583341182337ad54365cee2f101074df1a4b7c1b..871b91af6996d96165024c7e7fa54a2c4e5376d2 100644
--- a/runtime/vm/isolate_reload.cc
+++ b/runtime/vm/isolate_reload.cc
@@ -202,7 +202,7 @@ void ReasonForCancelling::AppendTo(JSONArray* array) {
JSONObject jsobj(array);
jsobj.AddProperty("type", "ReasonForCancelling");
const String& message = String::Handle(ToString());
- jsobj.AddProperty("message", message);
+ jsobj.AddProperty("message", message.ToCString());
}
@@ -211,7 +211,7 @@ void ClassReasonForCancelling::AppendTo(JSONArray* array) {
jsobj.AddProperty("type", "ReasonForCancelling");
jsobj.AddProperty("class", from_);
const String& message = String::Handle(ToString());
- jsobj.AddProperty("message", message);
+ jsobj.AddProperty("message", message.ToCString());
}
@@ -486,6 +486,9 @@ void IsolateReloadContext::Reload(bool force_reload) {
if (result.IsError()) {
const Error& error = Error::Cast(result);
AddReasonForCancelling(new Aborted(zone_, error));
+ // We call report on JSON here because we won't ever execute
+ // FinalizeLoading.
+ ReportOnJSON(js_);
}
}
@@ -537,9 +540,6 @@ void IsolateReloadContext::FinalizeLoading() {
RebuildDirectSubclasses();
BackgroundCompiler::Enable();
-
- reload_aborted_ = HasReasonsForCancelling();
- ReportOnJSON(js_);
}
@@ -1113,6 +1113,7 @@ void IsolateReloadContext::PostCommit() {
void IsolateReloadContext::AddReasonForCancelling(ReasonForCancelling* reason) {
+ reload_aborted_ = true;
reasons_to_cancel_reload_.Add(reason);
}
« no previous file with comments | « no previous file | runtime/vm/object_reload.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698