| 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 import "dart:collection" show HashMap; |    5 import "dart:collection" show HashMap; | 
|    6 import "dart:_internal"; |    6 import "dart:_internal"; | 
|    7  |    7  | 
|    8 patch class ReceivePort { |    8 patch class ReceivePort { | 
|    9   /* patch */ factory ReceivePort() = _ReceivePortImpl; |    9   /* patch */ factory ReceivePort() = _ReceivePortImpl; | 
|   10  |   10  | 
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   90 } |   90 } | 
|   91  |   91  | 
|   92 void _runPendingImmediateCallback() { |   92 void _runPendingImmediateCallback() { | 
|   93   if (_pendingImmediateCallback != null) { |   93   if (_pendingImmediateCallback != null) { | 
|   94     var callback = _pendingImmediateCallback; |   94     var callback = _pendingImmediateCallback; | 
|   95     _pendingImmediateCallback = null; |   95     _pendingImmediateCallback = null; | 
|   96     callback(); |   96     callback(); | 
|   97   } |   97   } | 
|   98 } |   98 } | 
|   99  |   99  | 
 |  100 ImmediateCallback _removePendingImmediateCallback() { | 
 |  101   var callback = _pendingImmediateCallback; | 
 |  102   _pendingImmediateCallback = null; | 
 |  103   return callback; | 
 |  104 } | 
 |  105  | 
|  100 /// The embedder can execute this function to get hold of |  106 /// The embedder can execute this function to get hold of | 
|  101 /// [_isolateScheduleImmediate] above. |  107 /// [_isolateScheduleImmediate] above. | 
|  102 Function _getIsolateScheduleImmediateClosure() { |  108 Function _getIsolateScheduleImmediateClosure() { | 
|  103   return _isolateScheduleImmediate; |  109   return _isolateScheduleImmediate; | 
|  104 } |  110 } | 
|  105  |  111  | 
|  106 class _RawReceivePortImpl implements RawReceivePort { |  112 class _RawReceivePortImpl implements RawReceivePort { | 
|  107   factory _RawReceivePortImpl() native "RawReceivePortImpl_factory"; |  113   factory _RawReceivePortImpl() native "RawReceivePortImpl_factory"; | 
|  108  |  114  | 
|  109   close() { |  115   close() { | 
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  409   static Isolate _getCurrentIsolate() { |  415   static Isolate _getCurrentIsolate() { | 
|  410     List portAndCapabilities = _getPortAndCapabilitiesOfCurrentIsolate(); |  416     List portAndCapabilities = _getPortAndCapabilitiesOfCurrentIsolate(); | 
|  411     return new Isolate(portAndCapabilities[0], |  417     return new Isolate(portAndCapabilities[0], | 
|  412                        pauseCapability: portAndCapabilities[1], |  418                        pauseCapability: portAndCapabilities[1], | 
|  413                        terminateCapability: portAndCapabilities[2]); |  419                        terminateCapability: portAndCapabilities[2]); | 
|  414   } |  420   } | 
|  415  |  421  | 
|  416   static List _getPortAndCapabilitiesOfCurrentIsolate() |  422   static List _getPortAndCapabilitiesOfCurrentIsolate() | 
|  417       native "Isolate_getPortAndCapabilitiesOfCurrentIsolate"; |  423       native "Isolate_getPortAndCapabilitiesOfCurrentIsolate"; | 
|  418 } |  424 } | 
| OLD | NEW |