Index: runtime/vm/dart_api_impl.cc |
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc |
index d5d7998a581ff24f8e8fd76b6d0bf8e902e5f5dd..fdc111e14208784c43118a5c6378114b09515a71 100644 |
--- a/runtime/vm/dart_api_impl.cc |
+++ b/runtime/vm/dart_api_impl.cc |
@@ -1486,7 +1486,8 @@ DART_EXPORT void Dart_SetStickyError(Dart_Handle error) { |
DART_EXPORT bool Dart_HasStickyError() { |
- Isolate* isolate = Isolate::Current(); |
+ Thread* T = Thread::Current(); |
+ Isolate* isolate = T->isolate(); |
CHECK_ISOLATE(isolate); |
NoSafepointScope no_safepoint_scope; |
return isolate->sticky_error() != Error::null(); |
@@ -1494,12 +1495,13 @@ DART_EXPORT bool Dart_HasStickyError() { |
DART_EXPORT Dart_Handle Dart_GetStickyError() { |
- Isolate* I = Isolate::Current(); |
+ Thread* T = Thread::Current(); |
+ Isolate* I = T->isolate(); |
CHECK_ISOLATE(I); |
NoSafepointScope no_safepoint_scope; |
- if (I->sticky_error() != Object::null()) { |
+ if (I->sticky_error() != Error::null()) { |
Dart_Handle error = |
- Api::NewHandle(Thread::Current(), I->sticky_error()); |
+ Api::NewHandle(T, I->sticky_error()); |
return error; |
} |
return Dart_Null(); |