| 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 library _interceptors; | 5 library _interceptors; |
| 6 | 6 |
| 7 import 'dart:_js_embedded_names' show | 7 import 'dart:_js_embedded_names' show |
| 8 DISPATCH_PROPERTY_NAME; | 8 DISPATCH_PROPERTY_NAME; |
| 9 | 9 |
| 10 import 'dart:collection'; | 10 import 'dart:collection'; |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 return JS_INTERCEPTOR_CONSTANT(PlainJavaScriptObject); | 168 return JS_INTERCEPTOR_CONSTANT(PlainJavaScriptObject); |
| 169 } else { | 169 } else { |
| 170 return JS_INTERCEPTOR_CONSTANT(UnknownJavaScriptObject); | 170 return JS_INTERCEPTOR_CONSTANT(UnknownJavaScriptObject); |
| 171 } | 171 } |
| 172 } | 172 } |
| 173 | 173 |
| 174 return interceptor; | 174 return interceptor; |
| 175 } | 175 } |
| 176 | 176 |
| 177 /** | 177 /** |
| 178 * If [JSInvocationMirror._invokeOn] is being used, this variable | |
| 179 * contains a JavaScript array with the names of methods that are | |
| 180 * intercepted. | |
| 181 */ | |
| 182 var interceptedNames; | |
| 183 | |
| 184 | |
| 185 /** | |
| 186 * Data structure used to map a [Type] to the [Interceptor] and constructors for | 178 * Data structure used to map a [Type] to the [Interceptor] and constructors for |
| 187 * that type. It is JavaScript array of 3N entries of adjacent slots containing | 179 * that type. It is JavaScript array of 3N entries of adjacent slots containing |
| 188 * a [Type], followed by an [Interceptor] class for the type, followed by a | 180 * a [Type], followed by an [Interceptor] class for the type, followed by a |
| 189 * JavaScript object map for the constructors. | 181 * JavaScript object map for the constructors. |
| 190 * | 182 * |
| 191 * The value of this variable is set by the compiler and contains only types | 183 * The value of this variable is set by the compiler and contains only types |
| 192 * that are user extensions of native classes where the type occurs as a | 184 * that are user extensions of native classes where the type occurs as a |
| 193 * constant in the program. | 185 * constant in the program. |
| 194 * | 186 * |
| 195 * The compiler, in CustomElementsAnalysis, assumes that [mapTypeToInterceptor] | 187 * The compiler, in CustomElementsAnalysis, assumes that [mapTypeToInterceptor] |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 403 * Interceptor for unclassified JavaScript objects, typically objects with a | 395 * Interceptor for unclassified JavaScript objects, typically objects with a |
| 404 * non-trivial prototype chain. | 396 * non-trivial prototype chain. |
| 405 * | 397 * |
| 406 * This class also serves as a fallback for unknown JavaScript exceptions. | 398 * This class also serves as a fallback for unknown JavaScript exceptions. |
| 407 */ | 399 */ |
| 408 class UnknownJavaScriptObject extends JavaScriptObject { | 400 class UnknownJavaScriptObject extends JavaScriptObject { |
| 409 const UnknownJavaScriptObject(); | 401 const UnknownJavaScriptObject(); |
| 410 | 402 |
| 411 String toString() => JS('String', 'String(#)', this); | 403 String toString() => JS('String', 'String(#)', this); |
| 412 } | 404 } |
| OLD | NEW |