| 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 cbc52c6f0479931c69aa56f5fe212a002f7bda3a..beffa6545db2207880813fe5d23a5ece8010bdac 100644
|
| --- a/pkg/dev_compiler/tool/input_sdk/private/js_helper.dart
|
| +++ b/pkg/dev_compiler/tool/input_sdk/private/js_helper.dart
|
| @@ -910,7 +910,14 @@ 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) {
|
| - if (dart.polyfill(object)) {
|
| - dart.applyAllExtensions(object);
|
| + try {
|
| + if (dart.polyfill(object)) {
|
| + dart.applyAllExtensions(object);
|
| + }
|
| + } catch (e) {
|
| + // This may fail due to cross-origin errors. In that case, we shouldn't
|
| + // need to polyfill as we can't get objects from that frame.
|
| +
|
| + // TODO(vsm): Detect this more robustly - ideally before we try to polyfill.
|
| }
|
| }
|
|
|