Index: runtime/vm/isolate.cc |
diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc |
index 69578c907a7b7c0dd3a8a199571669f312369e78..536922684293e909d8239a2bf5debdb4bb4bcbde 100644 |
--- a/runtime/vm/isolate.cc |
+++ b/runtime/vm/isolate.cc |
@@ -813,6 +813,7 @@ 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()), |
@@ -1066,11 +1067,6 @@ void Isolate::ReportReloadError(const Error& error) { |
} |
-void Isolate::OnStackReload() { |
- ReloadSources(); |
-} |
- |
- |
void Isolate::ReloadSources(bool test_mode) { |
ASSERT(!IsReloading()); |
has_attempted_reload_ = true; |
@@ -1090,6 +1086,10 @@ void Isolate::DoneFinalizing() { |
// context on the isolate so that it can be used by unit tests. |
return; |
} |
+ if (reload_context_->has_error()) { |
+ // Remember the reload error. |
+ sticky_reload_error_ = reload_context_->error(); |
+ } |
if (!reload_context_->has_error()) { |
reload_context_->ReportSuccess(); |
} |
@@ -1752,6 +1752,9 @@ 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_)); |
@@ -2005,6 +2008,11 @@ 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(); |