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

Unified Diff: pkg/dev_compiler/tool/input_sdk/private/js_helper.dart

Issue 2983903002: Polyfill only once (Closed)
Patch Set: 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/dev_compiler/tool/input_sdk/private/ddc_runtime/runtime.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
+ }
}
« no previous file with comments | « pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/runtime.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698