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

Unified Diff: sdk/lib/html/dartium/html_dartium.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 | « sdk/lib/html/dart2js/html_dart2js.dart ('k') | tools/dom/src/shared_html.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/html/dartium/html_dartium.dart
diff --git a/sdk/lib/html/dartium/html_dartium.dart b/sdk/lib/html/dartium/html_dartium.dart
index 68d6fc36ace8eee6f6b21841a9325286af266d46..f960a2caefd5e14fd2bf2dfb30d2dc25e0c6bc35 100644
--- a/sdk/lib/html/dartium/html_dartium.dart
+++ b/sdk/lib/html/dartium/html_dartium.dart
@@ -18820,10 +18820,7 @@ class MutationObserver extends NativeFieldWrapperClass1 {
}
factory MutationObserver(MutationCallback callback) =>
- new MutationObserver._((changes, observer) {
- _wrapZone(() {
- callback(changes, observer);
- });
+ new MutationObserver._(_wrapBinaryZone(callback));
});
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -35239,6 +35236,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) 2012, the Dart project authors. Please see the AUTHORS file
« no previous file with comments | « sdk/lib/html/dart2js/html_dart2js.dart ('k') | tools/dom/src/shared_html.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698