Chromium Code Reviews| Index: runtime/lib/isolate_patch.dart |
| diff --git a/runtime/lib/isolate.dart b/runtime/lib/isolate_patch.dart |
| similarity index 88% |
| rename from runtime/lib/isolate.dart |
| rename to runtime/lib/isolate_patch.dart |
| index 41c039cbe69b7caa79178f028a8266865dcdec13..0b1688ac04d136967e88cc9ed5840daa85d8b14f 100644 |
| --- a/runtime/lib/isolate.dart |
| +++ b/runtime/lib/isolate_patch.dart |
| @@ -2,15 +2,13 @@ |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| -class _ReceivePortFactory { |
| - factory ReceivePort() { |
| +patch class _ReceivePortFactory { |
| + /* patch */ factory ReceivePort() { |
| return new _ReceivePortImpl(); |
| } |
| } |
| - |
| class _ReceivePortImpl implements ReceivePort { |
| - /*--- public interface ---*/ |
| factory _ReceivePortImpl() native "ReceivePortImpl_factory"; |
| receive(void onMessage(var message, SendPort replyTo)) { |
| @@ -22,7 +20,7 @@ class _ReceivePortImpl implements ReceivePort { |
| _closeInternal(_id); |
| } |
| - SendPort toSendPort() { |
| + sendPort toSendPort() { |
|
Mads Ager (google)
2012/08/21 07:27:57
Undo this change?
Anders Johnsen
2012/08/21 07:45:05
Done.
|
| return new _SendPortImpl(_id); |
| } |
| @@ -118,13 +116,20 @@ _getPortInternal() native "isolate_getPortInternal"; |
| ReceivePort _portInternal; |
| -ReceivePort get _port() { |
| +patch ReceivePort get port() { |
| if (_portInternal === null) { |
| _portInternal = _getPortInternal(); |
| } |
| return _portInternal; |
| } |
| -_spawnFunction(void topLevelFunction()) native "isolate_spawnFunction"; |
| +patch spawnFunction(void topLevelFunction()) native "isolate_spawnFunction"; |
| + |
| +patch spawnUri(String uri) native "isolate_spawnUri"; |
| + |
| +/*************** |
|
Mads Ager (google)
2012/08/21 07:27:57
I would remove this from this file and add the TOD
Anders Johnsen
2012/08/21 07:45:05
Done.
|
| + Timer |
| + ***************/ |
| -_spawnUri(String uri) native "isolate_spawnUri"; |
| +// TODO(ajohnsen): Patch timer once we have support for patching named |
| +// factory constructors. |