| 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;
|
|
|