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

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

Issue 9662046: Isolate library changes for leg support. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 9 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 5
6 // Dart isolate's API and implementation for frog. Since dartdocs are generated 6 // Dart isolate's API and implementation for frog. Since dartdocs are generated
7 // using frog, we include here some additional library level comments. 7 // using frog, we include here some additional library level comments.
8 8
9 /** 9 /**
10 * The `dart:isolate` library defines APIs to spawn and communicate with 10 * The `dart:isolate` library defines APIs to spawn and communicate with
(...skipping 28 matching lines...) Expand all
39 */ 39 */
40 #library("dart:isolate"); 40 #library("dart:isolate");
41 41
42 #import("../uri/uri.dart"); 42 #import("../uri/uri.dart");
43 #source("isolate_api.dart"); 43 #source("isolate_api.dart");
44 #source("frog/compiler_hooks.dart"); 44 #source("frog/compiler_hooks.dart");
45 #source("frog/isolateimpl.dart"); 45 #source("frog/isolateimpl.dart");
46 #source("frog/ports.dart"); 46 #source("frog/ports.dart");
47 #source("frog/messages.dart"); 47 #source("frog/messages.dart");
48 #native("frog/natives.js"); 48 #native("frog/natives.js");
49
50 ReceivePort _port;
51
52 SendPort _spawnFunction(void topLevelFunction()) {
53 final name = _IsolateNatives._getJSFunctionName(topLevelFunction);
54 if (name == null) {
55 throw new UnsupportedOperationException(
56 "only top-level functions can be spawned.");
57 }
58 return _IsolateNatives._spawn2(name, null, false);
59 }
60
61 SendPort _spawnUri(String uri) {
62 return _IsolateNatives._spawn2(null, uri, false);
63 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698