| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 patch class ReceivePort { | 5 patch class ReceivePort { |
| 6 /* patch */ factory ReceivePort() { | 6 /* patch */ factory ReceivePort() { |
| 7 return new _ReceivePortImpl(); | 7 return new _ReceivePortImpl(); |
| 8 } | 8 } |
| 9 } | 9 } |
| 10 | 10 |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 | 116 |
| 117 ReceivePort _portInternal; | 117 ReceivePort _portInternal; |
| 118 | 118 |
| 119 patch ReceivePort get port { | 119 patch ReceivePort get port { |
| 120 if (_portInternal == null) { | 120 if (_portInternal == null) { |
| 121 _portInternal = _getPortInternal(); | 121 _portInternal = _getPortInternal(); |
| 122 } | 122 } |
| 123 return _portInternal; | 123 return _portInternal; |
| 124 } | 124 } |
| 125 | 125 |
| 126 patch spawnFunction(void topLevelFunction()) native "isolate_spawnFunction"; | 126 patch spawnFunction(void topLevelFunction(), |
| 127 [bool UnhandledExceptionCallback(IsolateUnhandledException e)]) |
| 128 native "isolate_spawnFunction"; |
| 127 | 129 |
| 128 patch spawnUri(String uri) native "isolate_spawnUri"; | 130 patch spawnUri(String uri) native "isolate_spawnUri"; |
| 129 | 131 |
| 130 patch class Timer { | 132 patch class Timer { |
| 131 /* patch */ factory Timer(int milliseconds, void callback(Timer timer)) { | 133 /* patch */ factory Timer(int milliseconds, void callback(Timer timer)) { |
| 132 if (_TimerFactory._factory == null) { | 134 if (_TimerFactory._factory == null) { |
| 133 throw new UnsupportedError("Timer interface not supported."); | 135 throw new UnsupportedError("Timer interface not supported."); |
| 134 } | 136 } |
| 135 return _TimerFactory._factory(milliseconds, callback, false); | 137 return _TimerFactory._factory(milliseconds, callback, false); |
| 136 } | 138 } |
| (...skipping 17 matching lines...) Expand all Loading... |
| 154 | 156 |
| 155 class _TimerFactory { | 157 class _TimerFactory { |
| 156 static _TimerFactoryClosure _factory; | 158 static _TimerFactoryClosure _factory; |
| 157 } | 159 } |
| 158 | 160 |
| 159 // TODO(ahe): Warning: this is NOT called by Dartium. Instead, it sets | 161 // TODO(ahe): Warning: this is NOT called by Dartium. Instead, it sets |
| 160 // [_TimerFactory._factory] directly. | 162 // [_TimerFactory._factory] directly. |
| 161 void _setTimerFactoryClosure(_TimerFactoryClosure closure) { | 163 void _setTimerFactoryClosure(_TimerFactoryClosure closure) { |
| 162 _TimerFactory._factory = closure; | 164 _TimerFactory._factory = closure; |
| 163 } | 165 } |
| OLD | NEW |