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

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

Issue 216383004: Merge initial implementation of deferred handling in the VM: (Closed) Base URL: http://dart.googlecode.com/svn/trunk/dart/
Patch Set: Created 6 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
« no previous file with comments | « runtime/lib/corelib_sources.gypi ('k') | runtime/lib/object.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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:async"; 5 import "dart:async";
6 import "dart:isolate"; 6 import "dart:isolate";
7 7
8 // This type corresponds to the VM-internal class LibraryPrefix. 8 // This type corresponds to the VM-internal class LibraryPrefix.
9 9
10 class _LibraryPrefix { 10 class _LibraryPrefix {
11 _load() native "LibraryPrefix_load"; 11 _load() native "LibraryPrefix_load";
12 12
13 loadLibrary() { 13 loadLibrary() {
14 var completer = new Completer<bool>(); 14 var completer = new Completer<bool>();
15 var port = new RawReceivePort(); 15 var port = new RawReceivePort();
16 port.handler = (_) { 16 port.handler = (_) {
17 this._load(); 17 this._load();
18 completer.complete(true); 18 completer.complete(true);
19 port.close(); 19 port.close();
20 }; 20 };
21 port.sendPort.send(1); 21 port.sendPort.send(1);
22 return completer.future; 22 return completer.future;
23 } 23 }
24 } 24 }
OLDNEW
« no previous file with comments | « runtime/lib/corelib_sources.gypi ('k') | runtime/lib/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698