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

Unified Diff: runtime/vm/isolate.cc

Issue 2240283002: Reload: Don't free the saved class table while another thread may be reading it. (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
Index: runtime/vm/isolate.cc
diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc
index 028a130008587d395e2d73e7c75a494339e72ba1..362d276b68e970cb23cd1885b33e7ca497f1e54d 100644
--- a/runtime/vm/isolate.cc
+++ b/runtime/vm/isolate.cc
@@ -1109,6 +1109,10 @@ bool Isolate::ReloadSources(JSONStream* js,
void Isolate::DeleteReloadContext() {
+ // Another thread may be in the middle of GetClassForHeapWalkAt.
+ Thread* thread = Thread::Current();
+ SafepointOperationScope safepoint_scope(thread);
+
delete reload_context_;
reload_context_ = NULL;
}

Powered by Google App Engine
This is Rietveld 408576698