Index: pkg/compiler/lib/src/js_backend/backend.dart |
diff --git a/pkg/compiler/lib/src/js_backend/backend.dart b/pkg/compiler/lib/src/js_backend/backend.dart |
index c7b70d2dfcd83b6cf4436a9d0ddf7a5b17a98727..b637d3ea3bc9f1824f117a1e9dffcc6f316d7665 100644 |
--- a/pkg/compiler/lib/src/js_backend/backend.dart |
+++ b/pkg/compiler/lib/src/js_backend/backend.dart |
@@ -2077,7 +2077,10 @@ class JavaScriptBackend extends Backend { |
Future onLibraryScanned(LibraryElement library, LibraryLoader loader) { |
return super.onLibraryScanned(library, loader).then((_) { |
- if (library.isPlatformLibrary && !library.isPatched) { |
+ if (library.isPlatformLibrary && |
+ // Don't patch library currently disallowed. |
+ !library.isSynthesized && |
+ !library.isPatched) { |
// Apply patch, if any. |
Uri patchUri = compiler.resolvePatchUri(library.canonicalUri.path); |
if (patchUri != null) { |