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

Side by Side Diff: sdk/lib/_internal/js_runtime/lib/isolate_patch.dart

Issue 2977583002: Fix handling of async patches. (Closed)
Patch Set: Fix Created 3 years, 5 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
« no previous file with comments | « pkg/compiler/lib/src/elements/modelx.dart ('k') | tests/isolate/resolve_package_uri_test.dart » ('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) 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 // Patch file for the dart:isolate library. 5 // Patch file for the dart:isolate library.
6 6
7 import 'dart:_js_helper' show patch; 7 import 'dart:_js_helper' show patch;
8 import 'dart:_isolate_helper' 8 import 'dart:_isolate_helper'
9 show CapabilityImpl, IsolateNatives, ReceivePortImpl, RawReceivePortImpl; 9 show CapabilityImpl, IsolateNatives, ReceivePortImpl, RawReceivePortImpl;
10 10
(...skipping 14 matching lines...) Expand all
25 } 25 }
26 26
27 @patch 27 @patch
28 static Future<Uri> get packageConfig { 28 static Future<Uri> get packageConfig {
29 throw new UnsupportedError("Isolate.packageConfig"); 29 throw new UnsupportedError("Isolate.packageConfig");
30 } 30 }
31 31
32 static Uri _packageBase = Uri.base.resolve(IsolateNatives.packagesBase); 32 static Uri _packageBase = Uri.base.resolve(IsolateNatives.packagesBase);
33 33
34 @patch 34 @patch
35 static Future<Uri> resolvePackageUri(Uri packageUri) async { 35 static Future<Uri> resolvePackageUri(Uri packageUri) {
36 if (packageUri.scheme != 'package') return packageUri; 36 if (packageUri.scheme != 'package') {
37 return _packageBase.resolveUri(packageUri.replace(scheme: '')); 37 return new Future<Uri>.value(packageUri);
38 }
39 return new Future<Uri>.value(
40 _packageBase.resolveUri(packageUri.replace(scheme: '')));
38 } 41 }
39 42
40 @patch 43 @patch
41 static Future<Isolate> spawn(void entryPoint(message), var message, 44 static Future<Isolate> spawn(void entryPoint(message), var message,
42 {bool paused: false, 45 {bool paused: false,
43 bool errorsAreFatal, 46 bool errorsAreFatal,
44 SendPort onExit, 47 SendPort onExit,
45 SendPort onError}) { 48 SendPort onError}) {
46 bool forcePause = 49 bool forcePause =
47 (errorsAreFatal != null) || (onExit != null) || (onError != null); 50 (errorsAreFatal != null) || (onExit != null) || (onError != null);
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 factory RawReceivePort([void handler(event)]) { 236 factory RawReceivePort([void handler(event)]) {
234 return new RawReceivePortImpl(handler); 237 return new RawReceivePortImpl(handler);
235 } 238 }
236 } 239 }
237 240
238 @patch 241 @patch
239 class Capability { 242 class Capability {
240 @patch 243 @patch
241 factory Capability() = CapabilityImpl; 244 factory Capability() = CapabilityImpl;
242 } 245 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/elements/modelx.dart ('k') | tests/isolate/resolve_package_uri_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698