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

Side by Side Diff: test/generated_sdk/lib/isolate/isolate.dart

Issue 1112403004: SDK fixes (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Formatting fix Created 5 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
OLDNEW
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 /** 5 /**
6 * Concurrent programming using _isolates_: 6 * Concurrent programming using _isolates_:
7 * independent workers that are similar to threads 7 * independent workers that are similar to threads
8 * but don't share memory, 8 * but don't share memory,
9 * communicating only via messages. 9 * communicating only via messages.
10 */ 10 */
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 * WARNING: The `pause` parameter is not implemented on all platforms yet. 215 * WARNING: The `pause` parameter is not implemented on all platforms yet.
216 * 216 *
217 * Returns a future that will complete with an [Isolate] instance if the 217 * Returns a future that will complete with an [Isolate] instance if the
218 * spawning succeeded. It will complete with an error otherwise. 218 * spawning succeeded. It will complete with an error otherwise.
219 */ 219 */
220 static Future<Isolate> spawnUri( 220 static Future<Isolate> spawnUri(
221 Uri uri, List<String> args, var message, { bool paused: false, 221 Uri uri, List<String> args, var message, { bool paused: false,
222 Uri packageRoot }) { 222 Uri packageRoot }) {
223 if (packageRoot != null) throw new UnimplementedError("packageRoot"); 223 if (packageRoot != null) throw new UnimplementedError("packageRoot");
224 try { 224 try {
225 if (args is List<String>) { 225 if (args is List) {
226 for (int i = 0; i < args.length; i++) { 226 for (int i = 0; i < args.length; i++) {
227 if (args[i] is! String) { 227 if (args[i] is! String) {
228 throw new ArgumentError("Args must be a list of Strings $args"); 228 throw new ArgumentError("Args must be a list of Strings $args");
229 } 229 }
230 } 230 }
231 } else if (args != null) { 231 } else if (args != null) {
232 throw new ArgumentError("Args must be a list of Strings $args"); 232 throw new ArgumentError("Args must be a list of Strings $args");
233 } 233 }
234 return IsolateNatives.spawnUri(uri, args, message, paused) 234 return IsolateNatives.spawnUri(uri, args, message, paused)
235 .then((msg) => new Isolate(msg[1], 235 .then((msg) => new Isolate(msg[1],
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
694 : _description = description, 694 : _description = description,
695 stackTrace = new _RemoteStackTrace(stackDescription); 695 stackTrace = new _RemoteStackTrace(stackDescription);
696 String toString() => _description; 696 String toString() => _description;
697 } 697 }
698 698
699 class _RemoteStackTrace implements StackTrace { 699 class _RemoteStackTrace implements StackTrace {
700 String _trace; 700 String _trace;
701 _RemoteStackTrace(this._trace); 701 _RemoteStackTrace(this._trace);
702 String toString() => _trace; 702 String toString() => _trace;
703 } 703 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698