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

Unified Diff: sdk/lib/html/html_common/conversions_dartium.dart

Issue 1873933002: Fix handling of cross-origin windows in dartium and better align general handling of different fram… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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 | « sdk/lib/html/dartium/html_dartium.dart ('k') | tools/dom/scripts/generate_blink_file.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | tools/dom/scripts/generate_blink_file.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698