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

Unified Diff: tools/dom/src/dart2js_Conversions.dart

Issue 15431003: Cleanup of various DOM dart2js and dart_analyzer warnings (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 7 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 | « tools/dom/src/WrappedList.dart ('k') | tools/dom/templates/html/dart2js/impl_MouseEvent.darttemplate » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/src/dart2js_Conversions.dart
diff --git a/tools/dom/src/dart2js_Conversions.dart b/tools/dom/src/dart2js_Conversions.dart
index 1c51b299acd5dec43b66020a1c6453fdf4f82154..86f32fb33c047eb32862af458630ca900a66d4b0 100644
--- a/tools/dom/src/dart2js_Conversions.dart
+++ b/tools/dom/src/dart2js_Conversions.dart
@@ -32,8 +32,14 @@ EventTarget _convertNativeToDart_EventTarget(e) {
// Assume it's a Window if it contains the setInterval property. It may be
// from a different frame - without a patched prototype - so we cannot
// rely on Dart type checking.
- if (JS('bool', r'"setInterval" in #', e))
- return _DOMWindowCrossFrame._createSafe(e);
+ if (JS('bool', r'"setInterval" in #', e)) {
+ var window = _DOMWindowCrossFrame._createSafe(e);
+ // If it's a native window.
+ if (window is EventTarget) {
+ return window;
+ }
+ return null;
+ }
else
return e;
}
« no previous file with comments | « tools/dom/src/WrappedList.dart ('k') | tools/dom/templates/html/dart2js/impl_MouseEvent.darttemplate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698