| Index: sdk/lib/_internal/lib/isolate_helper.dart
|
| diff --git a/sdk/lib/_internal/lib/isolate_helper.dart b/sdk/lib/_internal/lib/isolate_helper.dart
|
| index 691cfe20ccf03d34063c5f351ae489a0cd24d4b1..eefab48e333fe87970c2b04804a07d35de885965 100644
|
| --- a/sdk/lib/_internal/lib/isolate_helper.dart
|
| +++ b/sdk/lib/_internal/lib/isolate_helper.dart
|
| @@ -302,6 +302,18 @@ class _IsolateContext implements IsolateContext {
|
| _updateGlobalState();
|
| }
|
|
|
| + void handlePing(SendPort responsePort, int pingType) {
|
| + if (pingType == Isolate.PING_EVENT) {
|
| + _globalState.topEventLoop.enqueue(this, () {
|
| + responsePort.send(null);
|
| + }, "ping");
|
| + } else {
|
| + // There is no difference between PING_ALIVE and PING_CONTROL
|
| + // since we don't handle it before the control event queue.
|
| + responsePort.send(null);
|
| + }
|
| + }
|
| +
|
| /**
|
| * Run [code] in the context of the isolate represented by [this].
|
| */
|
| @@ -331,6 +343,9 @@ class _IsolateContext implements IsolateContext {
|
| case "resume":
|
| removePause(message[1]);
|
| break;
|
| + case "ping":
|
| + handlePing(message[1], message[2]);
|
| + break;
|
| default:
|
| print("UNKOWN MESSAGE: $message");
|
| }
|
|
|