| Index: sdk/lib/_internal/compiler/implementation/lib/isolate_patch.dart
|
| diff --git a/sdk/lib/_internal/compiler/implementation/lib/isolate_patch.dart b/sdk/lib/_internal/compiler/implementation/lib/isolate_patch.dart
|
| index 9c7b19d2173ff9fa4f679eda9747b65d3369c595..752a6723b7510c8f90374fbc8d8e0138925dbb9f 100644
|
| --- a/sdk/lib/_internal/compiler/implementation/lib/isolate_patch.dart
|
| +++ b/sdk/lib/_internal/compiler/implementation/lib/isolate_patch.dart
|
| @@ -96,24 +96,27 @@ void _fillStatics(context) {
|
| }
|
|
|
| ReceivePort _lazyPort;
|
| -patch ReceivePort get port {
|
| - if (_lazyPort == null) {
|
| - _lazyPort = new ReceivePort();
|
| +
|
| +patch class _Isolate {
|
| + patch static ReceivePort get port {
|
| + if (_lazyPort == null) {
|
| + _lazyPort = new ReceivePort();
|
| + }
|
| + return _lazyPort;
|
| }
|
| - return _lazyPort;
|
| -}
|
|
|
| -patch SendPort spawnFunction(void topLevelFunction()) {
|
| - final name = _IsolateNatives._getJSFunctionName(topLevelFunction);
|
| - if (name == null) {
|
| - throw new UnsupportedError(
|
| - "only top-level functions can be spawned.");
|
| + patch static SendPort spawnFunction(void topLevelFunction()) {
|
| + final name = _IsolateNatives._getJSFunctionName(topLevelFunction);
|
| + if (name == null) {
|
| + throw new UnsupportedError(
|
| + "only top-level functions can be spawned.");
|
| + }
|
| + return _IsolateNatives._spawn(name, null, false);
|
| }
|
| - return _IsolateNatives._spawn(name, null, false);
|
| -}
|
|
|
| -patch SendPort spawnUri(String uri) {
|
| - return _IsolateNatives._spawn(null, uri, false);
|
| + patch static SendPort spawnUri(String uri) {
|
| + return _IsolateNatives._spawn(null, uri, false);
|
| + }
|
| }
|
|
|
| /** State associated with the current manager. See [globalState]. */
|
|
|