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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/js_runtime/lib/isolate_patch.dart
diff --git a/sdk/lib/_internal/js_runtime/lib/isolate_patch.dart b/sdk/lib/_internal/js_runtime/lib/isolate_patch.dart
index 8bd8d1a4f5a352a9513fb3a75999ce22014e3a33..7418a7db8c54f6469d2b6c9e878ddc40aa991d3a 100644
--- a/sdk/lib/_internal/js_runtime/lib/isolate_patch.dart
+++ b/sdk/lib/_internal/js_runtime/lib/isolate_patch.dart
@@ -32,9 +32,12 @@ class Isolate {
static Uri _packageBase = Uri.base.resolve(IsolateNatives.packagesBase);
@patch
- static Future<Uri> resolvePackageUri(Uri packageUri) async {
- if (packageUri.scheme != 'package') return packageUri;
- return _packageBase.resolveUri(packageUri.replace(scheme: ''));
+ static Future<Uri> resolvePackageUri(Uri packageUri) {
+ if (packageUri.scheme != 'package') {
+ return new Future<Uri>.value(packageUri);
+ }
+ return new Future<Uri>.value(
+ _packageBase.resolveUri(packageUri.replace(scheme: '')));
}
@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 »

Powered by Google App Engine
This is Rietveld 408576698