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

Unified Diff: runtime/vm/unit_test.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
« runtime/vm/isolate_reload.cc ('K') | « 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 a877a1af1923f5bd0d0fa292335f228c17c8a5a3..b64722473e812c3caaf9aad7415b6a9654a3f5fb 100644
--- a/runtime/vm/unit_test.cc
+++ b/runtime/vm/unit_test.cc
@@ -331,9 +331,13 @@ Dart_Handle TestCase::ReloadTestScript(const char* script) {
result = GetReloadErrorOrRootLibrary();
- Isolate* isolate = Isolate::Current();
- if (isolate->reload_context() != NULL) {
- isolate->DeleteReloadContext();
+ {
+ Thread* thread = Thread::Current();
+ TransitionNativeToVM transition(thread);
+ Isolate* isolate = thread->isolate();
+ if (isolate->reload_context() != NULL) {
+ isolate->DeleteReloadContext();
+ }
}
return result;
« runtime/vm/isolate_reload.cc ('K') | « runtime/vm/isolate_reload.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698