Index: runtime/vm/thread.cc |
diff --git a/runtime/vm/thread.cc b/runtime/vm/thread.cc |
index 31ecabe5b28aeaab032185f2bb54c1a75ee6cbef..69a30fd434059dc79c7dd95c6d0eaffd48f2594a 100644 |
--- a/runtime/vm/thread.cc |
+++ b/runtime/vm/thread.cc |
@@ -274,6 +274,14 @@ void Thread::clear_sticky_error() { |
} |
+RawError* Thread::get_and_clear_sticky_error() { |
+ NoSafepointScope nss; |
+ RawError* return_value = sticky_error_; |
+ sticky_error_ = Error::null(); |
+ return return_value; |
+} |
+ |
+ |
const char* Thread::TaskKindToCString(TaskKind kind) { |
switch (kind) { |
case kUnknownTask: |