| Index: runtime/bin/process_android.cc
|
| diff --git a/runtime/bin/process_android.cc b/runtime/bin/process_android.cc
|
| index 9f6beeee0c71c3d1e504fd686ae8383ee0eb4ad8..41230452eddf253833a37e4be5d2c6047511600c 100644
|
| --- a/runtime/bin/process_android.cc
|
| +++ b/runtime/bin/process_android.cc
|
| @@ -1001,7 +1001,10 @@ intptr_t Process::SetSignalHandler(intptr_t signal) {
|
| }
|
|
|
|
|
| -void Process::ClearSignalHandler(intptr_t signal) {
|
| +void Process::ClearSignalHandler(intptr_t signal, Dart_Port port) {
|
| + // Either the port is illegal or there is no current isolate, but not both.
|
| + ASSERT((port != ILLEGAL_PORT) || (Dart_CurrentIsolate() == NULL));
|
| + ASSERT((port == ILLEGAL_PORT) || (Dart_CurrentIsolate() != NULL));
|
| ThreadSignalBlocker blocker(kSignalsCount, kSignals);
|
| MutexLocker lock(signal_mutex);
|
| SignalInfo* handler = signal_handlers;
|
| @@ -1009,7 +1012,7 @@ void Process::ClearSignalHandler(intptr_t signal) {
|
| while (handler != NULL) {
|
| bool remove = false;
|
| if (handler->signal() == signal) {
|
| - if (handler->port() == Dart_GetMainPortId()) {
|
| + if ((port == ILLEGAL_PORT) || (handler->port() == port)) {
|
| if (signal_handlers == handler) {
|
| signal_handlers = handler->next();
|
| }
|
|
|