| 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 d7c89dadd13fa16dd11020029ba99108c6e4ed12..106ac6ced036fa3c58623bc83249c3882f4702d1 100644
|
| --- a/sdk/lib/html/dartium/html_dartium.dart
|
| +++ b/sdk/lib/html/dartium/html_dartium.dart
|
| @@ -7707,7 +7707,6 @@ class Document extends Node
|
| @DocsEditable()
|
| DocumentFragment createDocumentFragment() native "Document_createDocumentFragment_Callback";
|
|
|
| - /// Deprecated: use new Element.tag(tagName) instead.
|
| @DomName('Document.createElement')
|
| @DocsEditable()
|
| Element _createElement(String localName_OR_tagName, [String typeExtension]) native "Document_createElement_Callback";
|
| @@ -30735,11 +30734,17 @@ class _EventStreamSubscription<T extends Event> extends StreamSubscription<T> {
|
| var _onData;
|
| final bool _useCapture;
|
|
|
| - _EventStreamSubscription(this._target, this._eventType, this._onData,
|
| - this._useCapture) {
|
| + _EventStreamSubscription(this._target, this._eventType, onData,
|
| + this._useCapture) : _onData = _wrapZone(onData) {
|
| _tryResume();
|
| }
|
|
|
| + static _wrapZone(callback) {
|
| + // For performance reasons avoid wrapping if we are in the root zone.
|
| + if (Zone.current == Zone.ROOT) return callback;
|
| + return Zone.current.bindUnaryCallback(callback, runGuarded: true);
|
| + }
|
| +
|
| void cancel() {
|
| if (_canceled) return;
|
|
|
| @@ -30758,7 +30763,7 @@ class _EventStreamSubscription<T extends Event> extends StreamSubscription<T> {
|
| // Remove current event listener.
|
| _unlisten();
|
|
|
| - _onData = handleData;
|
| + _onData = _wrapZone(handleData);
|
| _tryResume();
|
| }
|
|
|
|
|