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

Unified Diff: runtime/vm/unit_test.cc

Issue 2208553002: Simplify reload error reporting (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 | « runtime/vm/isolate_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/unit_test.cc
diff --git a/runtime/vm/unit_test.cc b/runtime/vm/unit_test.cc
index cb7170f11c9afb2464138e9ff98b99b0e3cfe8b4..a877a1af1923f5bd0d0fa292335f228c17c8a5a3 100644
--- a/runtime/vm/unit_test.cc
+++ b/runtime/vm/unit_test.cc
@@ -291,16 +291,20 @@ void TestCase::SetReloadTestScript(const char* script) {
Dart_Handle TestCase::TriggerReload() {
Isolate* isolate = Isolate::Current();
JSONStream js;
-
+ bool success = false;
{
TransitionNativeToVM transition(Thread::Current());
- isolate->ReloadSources(&js,
- false, // force_reload
- true); // dont_delete_reload_context
+ success = isolate->ReloadSources(&js,
+ false, // force_reload
+ true); // dont_delete_reload_context
fprintf(stderr, "RELOAD REPORT:\n%s\n", js.ToCString());
rmacnak 2016/08/03 19:55:25 OS::PrintErr
Cutch 2016/08/03 21:17:19 Acknowledged.
}
- return Dart_FinalizeLoading(false);
+ if (success) {
+ return Dart_FinalizeLoading(false);
+ } else {
+ return Dart_Null();
rmacnak 2016/08/03 19:55:25 Shouldn't this return some kind of error?
Cutch 2016/08/03 21:17:19 In the unit tests we keep the reload context alive
+ }
}
« no previous file with comments | « runtime/vm/isolate_reload.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698