Index: sdk/lib/html/html_common/conversions_dartium.dart |
diff --git a/sdk/lib/html/html_common/conversions_dartium.dart b/sdk/lib/html/html_common/conversions_dartium.dart |
index ef02c00b649893a847584e2d827e179424b73e14..ce459206f534ab675f4553e037f31cdcc7ac82c6 100644 |
--- a/sdk/lib/html/html_common/conversions_dartium.dart |
+++ b/sdk/lib/html/html_common/conversions_dartium.dart |
@@ -267,9 +267,15 @@ Type lookupType(js.JsObject jsObject, bool isElement) { |
} |
prototype = js.JsNative.getProperty(prototype, '__proto__'); |
} |
- } catch (e, stacktrace) { |
- if (e is DebugAssertException) print("${e.message}\n ${stacktrace}"); |
- else print("${stacktrace}"); |
+ } catch (e) { |
+ // This case can happen for cross frame objects. |
+ if (js.JsNative.hasProperty(e, "postMessage")) { |
Alan Knight
2016/04/12 17:05:58
Is this safe? There are quite a few other things w
Jacob
2016/04/12 17:08:51
This is the exact same conversion used in dart2js.
|
+ // assume this is a Window. To match Dart2JS, separate conversion code |
+ // in dart:html will switch the wrapper to a cross frame window as |
+ // required. |
+ // TODO(jacobr): we could consider removing this code completely. |
+ return Window.instanceRuntimeType; |
+ } |
} |
return js.JSObject.instanceRuntimeType; |
} |