Chromium Code Reviews| 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..46eb383ab72242fd5a58f03cc1e7eed2f0a90511 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)); |
|
floitsch
2013/10/24 14:27:10
We are in the isolate library. So Isolate._fromCon
Lasse Reichstein Nielsen
2013/10/25 10:38:16
Avk, yes. Didn't need it in isolate_helper anyway.
|
| } |
| - patch static Future<Isolate> spawnUri(Uri uri, var arguments) { |
| + patch static Future<Isolate> spawnUri(Uri uri, var message) { |
| throw new UnimplementedError("spawn uri"); |
| } |
| } |
| @@ -28,14 +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); |
| + static SendPort _spawnFunction(void topLevelFunction(), [message]) { |
|
floitsch
2013/10/24 14:27:10
remove this static and call directly the IsolateNa
Lasse Reichstein Nielsen
2013/10/25 10:38:16
Removed completely. It's not being called.
|
| + return IsolateNatives.spawnFunction(topLevelFunction, message); |
| } |
| patch static SendPort spawnUri(String uri) { |
| @@ -58,4 +53,4 @@ patch class RawReceivePort { |
| patch factory RawReceivePort([void handler(event)]) { |
| throw new UnimplementedError("RawReceivePort"); |
| } |
| -} |
| +} |