Chromium Code Reviews| Index: tools/dom/templates/html/dart2js/html_dart2js.darttemplate |
| diff --git a/tools/dom/templates/html/dart2js/html_dart2js.darttemplate b/tools/dom/templates/html/dart2js/html_dart2js.darttemplate |
| index c2868a9504b613f349195ac2d39f5215f2a47752..9bc443a8f4c7d8f71074cf971fd28e2ed02daef2 100644 |
| --- a/tools/dom/templates/html/dart2js/html_dart2js.darttemplate |
| +++ b/tools/dom/templates/html/dart2js/html_dart2js.darttemplate |
| @@ -53,7 +53,7 @@ import 'dart:_js_helper' show |
| makeLeafDispatchRecord; |
| import 'dart:_interceptors' show |
| Interceptor, JSExtendableArray, findInterceptorConstructorForType, |
| - findConstructorForWebComponentType, getNativeInterceptor, |
| + findConstructorForWebComponentType, getNativeInterceptor, |
| setDispatchProperty, findInterceptorForType; |
| import 'dart:_isolate_helper' show IsolateNatives; |
| import 'dart:_foreign_helper' show JS; |
| @@ -147,3 +147,9 @@ int _getNewIsolateId() { |
| _callPortSync(int id, message) { |
| return JS('var', r'ReceivePortSync.dispatchCall(#, #)', id, message); |
| } |
| + |
| +_wrapZone(callback) { |
|
Emily Fortuna
2013/10/14 17:30:39
feels a little suboptimal to put the identical cod
blois
2013/10/14 19:48:50
Done.
|
| + // 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); |
| +} |