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

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

Side-by-side diff isn't available for this file because of its large size.
Issue 27403002: MutationObserver changes for zones (again) (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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 | sdk/lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/html/dart2js/html_dart2js.dart
diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart
index 77fd27463337590acfa2e8c32335ab28545eba83..83f6fbf1321d144eae60e65a00ff0bb75c37be71 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -17531,11 +17531,7 @@ class MutationObserver extends Interceptor native "MutationObserver,WebKitMutati
return JS('MutationObserver',
'new(window.MutationObserver||window.WebKitMutationObserver||'
'window.MozMutationObserver)(#)',
- convertDartClosureToJS((changes, observer) {
- _wrapZone(() {
- callback(changes, observer);
- });
- }, 2));
+ convertDartClosureToJS(_wrapBinaryZone(callback), 2));
}
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -33417,6 +33413,11 @@ _wrapZone(callback) {
return Zone.current.bindUnaryCallback(callback, runGuarded: true);
}
+_wrapBinaryZone(callback) {
+ if (Zone.current == Zone.ROOT) return callback;
+ return Zone.current.bindBinaryCallback(callback, runGuarded: true);
+}
+
Element query(String selector) => document.query(selector);
ElementList queryAll(String selector) => document.queryAll(selector);
// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
« no previous file with comments | « no previous file | sdk/lib/html/dartium/html_dartium.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698