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

Unified Diff: dart/sdk/lib/html/dart2js/html_dart2js.dart

Issue 406143004: Bugfix in html_dart2js: Detect window objects in a way compatible with cross domain iframes (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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:
Download patch
« no previous file with comments | « no previous file | dart/tests/html/cross_domain_iframe_script.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/sdk/lib/html/dart2js/html_dart2js.dart
diff --git a/dart/sdk/lib/html/dart2js/html_dart2js.dart b/dart/sdk/lib/html/dart2js/html_dart2js.dart
index 7a2e9050709f9a44b31f75fa7ede832280a597d0..7c57b6e5de9203b7d6503aea8e388c180b0928ba 100644
--- a/dart/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/dart/sdk/lib/html/dart2js/html_dart2js.dart
@@ -35436,10 +35436,10 @@ EventTarget _convertNativeToDart_EventTarget(e) {
if (e == null) {
return null;
}
- // Assume it's a Window if it contains the setInterval property. It may be
+ // Assume it's a Window if it contains the self/window properties. It may be
blois 2014/07/23 17:35:04 This change needs to be made in: https://code.goog
kustermann 2014/07/23 20:10:49 Done.
// from a different frame - without a patched prototype - so we cannot
// rely on Dart type checking.
- if (JS('bool', r'"setInterval" in #', e)) {
+ if (JS('bool', r'"self" in # && "window" in #', e, e)) {
blois 2014/07/23 17:35:04 The primary API exposed by _DOMWindowCrossFrame is
floitsch 2014/07/23 17:57:36 That would bring it back to being a security viola
kustermann 2014/07/23 20:10:49 Good point. Done. [I searched a bit on the intern
kustermann 2014/07/23 20:10:49 That's actually not a security violation, because
var window = _DOMWindowCrossFrame._createSafe(e);
// If it's a native window.
if (window is EventTarget) {
« no previous file with comments | « no previous file | dart/tests/html/cross_domain_iframe_script.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698