Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(629)

Side by Side Diff: runtime/lib/isolate.dart

Issue 10386107: Implement spawnUri from dart:isolate. This function allows us to (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 class _ReceivePortFactory { 5 class _ReceivePortFactory {
6 factory ReceivePort() { 6 factory ReceivePort() {
7 return new _ReceivePortImpl(); 7 return new _ReceivePortImpl();
8 } 8 }
9 } 9 }
10 10
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 } 123 }
124 124
125 // Starts a new isolate calling the run method on a new instance of the 125 // Starts a new isolate calling the run method on a new instance of the
126 // remote class's type. 126 // remote class's type.
127 // Returns the send port which is passed to the newly created isolate. 127 // Returns the send port which is passed to the newly created isolate.
128 // This method is being dispatched to from the public core library code. 128 // This method is being dispatched to from the public core library code.
129 static SendPort _start(Isolate isolate, bool light) 129 static SendPort _start(Isolate isolate, bool light)
130 native "IsolateNatives_start"; 130 native "IsolateNatives_start";
131 } 131 }
132 132
133 _getPortInternal() native "isolate_getPortInternal"; 133 _getPortInternal() native "isolate_getPortInternal";
Ivan Posva 2012/05/15 00:04:46 I must have missed this previously. Is there any r
turnidge 2012/05/15 17:47:38 getPortInternal is a top-level function in the lib
134 134
135 ReceivePort _portInternal; 135 ReceivePort _portInternal;
136 136
137 ReceivePort get _port() { 137 ReceivePort get _port() {
138 if (_portInternal === null) { 138 if (_portInternal === null) {
139 _portInternal = _getPortInternal(); 139 _portInternal = _getPortInternal();
140 } 140 }
141 return _portInternal; 141 return _portInternal;
142 } 142 }
143 143
144 _spawnFunction(void topLevelFunction()) native "isolate_spawnFunction"; 144 _spawnFunction(void topLevelFunction()) native "isolate_spawnFunction";
145 145
146 // TODO(sigmund,turnidge): implement 146 _spawnUri(String uri) native "isolate_spawnUri";
147 SendPort _spawnUri(String uri) {
148 throw new NotImplementedException();
149 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698