| Index: sdk/lib/_internal/lib/isolate_patch.dart
|
| diff --git a/sdk/lib/_internal/lib/isolate_patch.dart b/sdk/lib/_internal/lib/isolate_patch.dart
|
| index 4f9ac711fbff3707dfce71c6cd8f20ff19ef1221..397b408b1e106cd004a96d84944c25975d61fd4d 100644
|
| --- a/sdk/lib/_internal/lib/isolate_patch.dart
|
| +++ b/sdk/lib/_internal/lib/isolate_patch.dart
|
| @@ -12,10 +12,11 @@ import 'dart:_isolate_helper' show IsolateNatives,
|
|
|
| patch class Isolate {
|
| patch static Future<Isolate> spawn(void entryPoint(message), var message) {
|
| - throw new UnimplementedError("spawn");
|
| + SendPort controlPort = IsolateNatives.spawnFunction(entryPoint, message);
|
| + return new Future<Isolate>.value(new Isolate._fromControlPort(controlPort));
|
| }
|
|
|
| - patch static Future<Isolate> spawnUri(Uri uri, var arguments) {
|
| + patch static Future<Isolate> spawnUri(Uri uri, var message) {
|
| throw new UnimplementedError("spawn uri");
|
| }
|
| }
|
| @@ -28,18 +29,8 @@ patch class _Isolate {
|
| return lazyPort;
|
| }
|
|
|
| - static SendPort _spawnFunction(void topLevelFunction(),
|
| - [bool unhandledExceptionCallback(IsolateUnhandledException e)]) {
|
| - if (unhandledExceptionCallback != null) {
|
| - // TODO(9012): Implement the UnhandledExceptionCallback.
|
| - throw new UnimplementedError(
|
| - "spawnFunction with unhandledExceptionCallback");
|
| - }
|
| - return IsolateNatives.spawnFunction(topLevelFunction);
|
| - }
|
| -
|
| patch static SendPort spawnUri(String uri) {
|
| - return IsolateNatives.spawn(null, uri, false);
|
| + return IsolateNatives.spawn(null, uri, null, false);
|
| }
|
| }
|
|
|
| @@ -58,4 +49,4 @@ patch class RawReceivePort {
|
| patch factory RawReceivePort([void handler(event)]) {
|
| throw new UnimplementedError("RawReceivePort");
|
| }
|
| -}
|
| +}
|
|
|