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

Unified Diff: runtime/vm/object_store.cc

Issue 1769183003: Fix sticky error propagation from thread to isolate (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Allow only mutator thread to propagate sticky error Created 4 years, 9 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
« runtime/vm/object_store.h ('K') | « runtime/vm/object_store.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object_store.cc
diff --git a/runtime/vm/object_store.cc b/runtime/vm/object_store.cc
index a0feb38bb8eea238f547e4fc1fe72a674e12dda4..91e3f1ae0be2c31cc30a24f4245e566fc83e4886 100644
--- a/runtime/vm/object_store.cc
+++ b/runtime/vm/object_store.cc
@@ -79,6 +79,7 @@ ObjectStore::ObjectStore()
resume_capabilities_(GrowableObjectArray::null()),
exit_listeners_(GrowableObjectArray::null()),
error_listeners_(GrowableObjectArray::null()),
+ sticky_error_(Error::null()),
empty_context_(Context::null()),
stack_overflow_(Instance::null()),
out_of_memory_(Instance::null()),
@@ -105,6 +106,17 @@ ObjectStore::~ObjectStore() {
}
+void ObjectStore::SetStickyErrorFromThread(const Thread* thread) {
+ ASSERT(thread->IsMutatorThread());
+ if (thread->sticky_error() == Error::null()) {
+ return;
+ }
+ // Protect overwriting valid error.
+ ASSERT(sticky_error_ == Error::null());
+ sticky_error_ = thread->sticky_error();
+}
+
+
void ObjectStore::VisitObjectPointers(ObjectPointerVisitor* visitor) {
ASSERT(visitor != NULL);
visitor->VisitPointers(from(), to());
« runtime/vm/object_store.h ('K') | « runtime/vm/object_store.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698