Index: pkg/dev_compiler/tool/input_sdk/private/js_helper.dart |
diff --git a/pkg/dev_compiler/tool/input_sdk/private/js_helper.dart b/pkg/dev_compiler/tool/input_sdk/private/js_helper.dart |
index eb932e36bec893ff25712425f124fbef708da2f5..cbc52c6f0479931c69aa56f5fe212a002f7bda3a 100644 |
--- a/pkg/dev_compiler/tool/input_sdk/private/js_helper.dart |
+++ b/pkg/dev_compiler/tool/input_sdk/private/js_helper.dart |
@@ -910,6 +910,7 @@ class BooleanConversionAssertionError extends AssertionError { |
// Hook to register new global object. This is invoked from dart:html |
// whenever a new window is accessed for the first time. |
void registerGlobalObject(object) { |
- dart.polyfill(object); |
- dart.applyAllExtensions(object); |
+ if (dart.polyfill(object)) { |
+ dart.applyAllExtensions(object); |
+ } |
} |