| Index: runtime/vm/thread_interrupter_linux.cc
|
| diff --git a/runtime/vm/thread_interrupter_linux.cc b/runtime/vm/thread_interrupter_linux.cc
|
| index d7b9b8532abf2e3fd05d76603f5ff89e81dedf69..a09f1b782acec3f62e82a770f73246f519cd110a 100644
|
| --- a/runtime/vm/thread_interrupter_linux.cc
|
| +++ b/runtime/vm/thread_interrupter_linux.cc
|
| @@ -5,6 +5,8 @@
|
| #include "platform/globals.h"
|
| #if defined(TARGET_OS_LINUX)
|
|
|
| +#include <errno.h> // NOLINT
|
| +
|
| #include "vm/flags.h"
|
| #include "vm/os.h"
|
| #include "vm/signal_handler.h"
|
| @@ -27,8 +29,7 @@ class ThreadInterrupterLinux : public AllStatic {
|
| return;
|
| }
|
| ThreadInterruptCallback callback = NULL;
|
| - void* callback_data = NULL;
|
| - if (!thread->IsThreadInterrupterEnabled(&callback, &callback_data)) {
|
| + if (!thread->GetThreadInterruptCallback(&callback)) {
|
| return;
|
| }
|
| // Extract thread state.
|
| @@ -41,7 +42,7 @@ class ThreadInterrupterLinux : public AllStatic {
|
| its.csp = SignalHandler::GetCStackPointer(mcontext);
|
| its.dsp = SignalHandler::GetDartStackPointer(mcontext);
|
| its.lr = SignalHandler::GetLinkRegister(mcontext);
|
| - callback(its, callback_data);
|
| + callback(thread, its);
|
| }
|
| };
|
|
|
| @@ -52,7 +53,7 @@ void ThreadInterrupter::InterruptThread(Thread* thread) {
|
| reinterpret_cast<void*>(thread->id()));
|
| }
|
| int result = pthread_kill(thread->id(), SIGPROF);
|
| - ASSERT(result == 0);
|
| + ASSERT((result == 0) || (result == ESRCH));
|
| }
|
|
|
|
|
|
|