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

Unified Diff: runtime/vm/isolate.cc

Issue 2196723002: Refactor how we report reload results (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: tweak Created 4 years, 5 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/isolate_reload.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 27a3529c96fd6d8e5095fb203cad9ab601a9fe75..c743fae446206b5c287d138a331ff82cb42b8794 100644
--- a/runtime/vm/isolate.cc
+++ b/runtime/vm/isolate.cc
@@ -827,7 +827,6 @@ Isolate::Isolate(const Dart_IsolateFlags& api_flags)
tag_table_(GrowableObjectArray::null()),
deoptimized_code_array_(GrowableObjectArray::null()),
sticky_error_(Error::null()),
- sticky_reload_error_(Error::null()),
background_compiler_(NULL),
background_compiler_disabled_depth_(0),
pending_service_extension_calls_(GrowableObjectArray::null()),
@@ -1096,20 +1095,23 @@ void Isolate::ReportReloadError(const Error& error) {
}
-void Isolate::ReloadSources(bool force_reload,
+bool Isolate::ReloadSources(JSONStream* js,
+ bool force_reload,
bool dont_delete_reload_context) {
// TODO(asiva): Add verification of canonical objects.
ASSERT(!IsReloading());
has_attempted_reload_ = true;
- reload_context_ = new IsolateReloadContext(this);
+ reload_context_ = new IsolateReloadContext(this, js);
reload_context_->StartReload(force_reload);
+ bool success = !reload_context_->has_error();
// TODO(asiva): Add verification of canonical objects.
if (dont_delete_reload_context) {
// Unit tests use the reload context later. Caller is responsible
// for deleting the context.
- return;
+ return success;
}
DeleteReloadContext();
+ return success;
}
@@ -1124,12 +1126,6 @@ void Isolate::DoneFinalizing() {
NOT_IN_PRODUCT(
if (IsReloading()) {
reload_context_->FinishReload();
- if (reload_context_->has_error()) {
- // Remember the reload error.
- sticky_reload_error_ = reload_context_->error();
- } else {
- reload_context_->ReportSuccess();
- }
}
)
}
@@ -1831,9 +1827,6 @@ void Isolate::VisitObjectPointers(ObjectPointerVisitor* visitor,
visitor->VisitPointer(
reinterpret_cast<RawObject**>(&sticky_error_));
- visitor->VisitPointer(
- reinterpret_cast<RawObject**>(&sticky_reload_error_));
-
// Visit the pending service extension calls.
visitor->VisitPointer(
reinterpret_cast<RawObject**>(&pending_service_extension_calls_));
@@ -2094,11 +2087,6 @@ void Isolate::clear_sticky_error() {
}
-void Isolate::clear_sticky_reload_error() {
- sticky_reload_error_ = Error::null();
-}
-
-
void Isolate::set_pending_service_extension_calls(
const GrowableObjectArray& value) {
pending_service_extension_calls_ = value.raw();
« no previous file with comments | « runtime/vm/isolate.h ('k') | runtime/vm/isolate_reload.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698