Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 // DO NOT EDIT - unless you are editing documentation as per: | 5 // DO NOT EDIT - unless you are editing documentation as per: |
| 6 // https://code.google.com/p/dart/wiki/ContributingHTMLDocumentation | 6 // https://code.google.com/p/dart/wiki/ContributingHTMLDocumentation |
| 7 // Auto-generated dart:html library. | 7 // Auto-generated dart:html library. |
| 8 | 8 |
| 9 /** | 9 /** |
| 10 * HTML elements and other resources for web-based applications that need to | 10 * HTML elements and other resources for web-based applications that need to |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 46 import 'dart:web_audio' as web_audio; | 46 import 'dart:web_audio' as web_audio; |
| 47 import 'dart:web_gl' as gl; | 47 import 'dart:web_gl' as gl; |
| 48 import 'dart:web_sql'; | 48 import 'dart:web_sql'; |
| 49 import 'dart:_js_helper' show | 49 import 'dart:_js_helper' show |
| 50 convertDartClosureToJS, Creates, JavaScriptIndexingBehavior, | 50 convertDartClosureToJS, Creates, JavaScriptIndexingBehavior, |
| 51 JSName, Null, Returns, | 51 JSName, Null, Returns, |
| 52 findDispatchTagForInterceptorClass, setNativeSubclassDispatchRecord, | 52 findDispatchTagForInterceptorClass, setNativeSubclassDispatchRecord, |
| 53 makeLeafDispatchRecord; | 53 makeLeafDispatchRecord; |
| 54 import 'dart:_interceptors' show | 54 import 'dart:_interceptors' show |
| 55 Interceptor, JSExtendableArray, findInterceptorConstructorForType, | 55 Interceptor, JSExtendableArray, findInterceptorConstructorForType, |
| 56 findConstructorForWebComponentType, getNativeInterceptor, | 56 findConstructorForWebComponentType, getNativeInterceptor, |
| 57 setDispatchProperty, findInterceptorForType; | 57 setDispatchProperty, findInterceptorForType; |
| 58 import 'dart:_isolate_helper' show IsolateNatives; | 58 import 'dart:_isolate_helper' show IsolateNatives; |
| 59 import 'dart:_foreign_helper' show JS; | 59 import 'dart:_foreign_helper' show JS; |
| 60 | 60 |
| 61 export 'dart:math' show Rectangle, Point; | 61 export 'dart:math' show Rectangle, Point; |
| 62 | 62 |
| 63 $!GENERATED_DART_FILES | 63 $!GENERATED_DART_FILES |
| 64 | 64 |
| 65 part '$AUXILIARY_DIR/AttributeMap.dart'; | 65 part '$AUXILIARY_DIR/AttributeMap.dart'; |
| 66 part '$AUXILIARY_DIR/CanvasImageSource.dart'; | 66 part '$AUXILIARY_DIR/CanvasImageSource.dart'; |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 140 if (JS('bool', r'!window.$dart$isolate$counter')) { | 140 if (JS('bool', r'!window.$dart$isolate$counter')) { |
| 141 JS('void', r'window.$dart$isolate$counter = 1'); | 141 JS('void', r'window.$dart$isolate$counter = 1'); |
| 142 } | 142 } |
| 143 return JS('int', r'window.$dart$isolate$counter++'); | 143 return JS('int', r'window.$dart$isolate$counter++'); |
| 144 } | 144 } |
| 145 | 145 |
| 146 // Fast path to invoke JS send port. | 146 // Fast path to invoke JS send port. |
| 147 _callPortSync(int id, message) { | 147 _callPortSync(int id, message) { |
| 148 return JS('var', r'ReceivePortSync.dispatchCall(#, #)', id, message); | 148 return JS('var', r'ReceivePortSync.dispatchCall(#, #)', id, message); |
| 149 } | 149 } |
| 150 | |
| 151 _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.
| |
| 152 // For performance reasons avoid wrapping if we are in the root zone. | |
| 153 if (Zone.current == Zone.ROOT) return callback; | |
| 154 return Zone.current.bindUnaryCallback(callback, runGuarded: true); | |
| 155 } | |
| OLD | NEW |