| 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 fa3765e673cdb3a57a72d0277a7f86d140da9887..8a19dc68f8ec115055d8fa9849269fa69506318b 100644
|
| --- a/sdk/lib/_internal/lib/isolate_helper.dart
|
| +++ b/sdk/lib/_internal/lib/isolate_helper.dart
|
| @@ -331,6 +331,18 @@ class _IsolateContext implements IsolateContext {
|
| this.errorsAreFatal = errorsAreFatal;
|
| }
|
|
|
| + 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].
|
| */
|
| @@ -369,6 +381,9 @@ class _IsolateContext implements IsolateContext {
|
| case 'set-errors-fatal':
|
| setErrorsFatal(message[1], message[2]);
|
| break;
|
| + case "ping":
|
| + handlePing(message[1], message[2]);
|
| + break;
|
| default:
|
| print("UNKNOWN MESSAGE: $message");
|
| }
|
|
|