| Index: runtime/vm/thread.cc
|
| diff --git a/runtime/vm/thread.cc b/runtime/vm/thread.cc
|
| index adfc4b4ee2bc7baf4f2ab0827e9ed654314a26e9..0fa2d403f06f2e5fa2a59886046097e637225ff6 100644
|
| --- a/runtime/vm/thread.cc
|
| +++ b/runtime/vm/thread.cc
|
| @@ -62,6 +62,7 @@ Thread::Thread(Isolate* isolate)
|
| deopt_id_(0),
|
| vm_tag_(0),
|
| pending_functions_(GrowableObjectArray::null()),
|
| + sticky_error_(Error::null()),
|
| REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_INITIALIZERS)
|
| REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_SCOPE_INIT)
|
| safepoint_state_(0),
|
| @@ -175,6 +176,27 @@ RawGrowableObjectArray* Thread::pending_functions() {
|
| }
|
|
|
|
|
| +void Thread::clear_pending_functions() {
|
| + pending_functions_ = GrowableObjectArray::null();
|
| +}
|
| +
|
| +
|
| +RawError* Thread::sticky_error() const {
|
| + return sticky_error_;
|
| +}
|
| +
|
| +
|
| +void Thread::set_sticky_error(const Error& value) {
|
| + ASSERT(!value.IsNull());
|
| + sticky_error_ = value.raw();
|
| +}
|
| +
|
| +
|
| +void Thread::clear_sticky_error() {
|
| + sticky_error_ = Error::null();
|
| +}
|
| +
|
| +
|
| bool Thread::EnterIsolate(Isolate* isolate) {
|
| const bool kIsMutatorThread = true;
|
| Thread* thread = isolate->ScheduleThread(kIsMutatorThread);
|
| @@ -332,11 +354,10 @@ void Thread::VisitObjectPointers(ObjectPointerVisitor* visitor) {
|
| // Visit objects in thread specific handles area.
|
| reusable_handles_.VisitObjectPointers(visitor);
|
|
|
| - // Visit the pending functions.
|
| - if (pending_functions_ != GrowableObjectArray::null()) {
|
| - visitor->VisitPointer(
|
| - reinterpret_cast<RawObject**>(&pending_functions_));
|
| - }
|
| + visitor->VisitPointer(
|
| + reinterpret_cast<RawObject**>(&pending_functions_));
|
| + visitor->VisitPointer(
|
| + reinterpret_cast<RawObject**>(&sticky_error_));
|
|
|
| // Visit the api local scope as it has all the api local handles.
|
| ApiLocalScope* scope = api_top_scope_;
|
|
|