| Index: sdk/lib/_internal/js_runtime/lib/interceptors.dart
|
| diff --git a/sdk/lib/_internal/js_runtime/lib/interceptors.dart b/sdk/lib/_internal/js_runtime/lib/interceptors.dart
|
| index f13c3f8f4200f300fd51e1f9d8b9131a3f6cace1..23025ad578cc34276949080428a92a0e7b49fcab 100644
|
| --- a/sdk/lib/_internal/js_runtime/lib/interceptors.dart
|
| +++ b/sdk/lib/_internal/js_runtime/lib/interceptors.dart
|
| @@ -168,16 +168,7 @@ getNativeInterceptor(object) {
|
| }
|
| }
|
|
|
| - // Check for cached UnknownJavaScriptObject. This avoids doing the slow
|
| - // dispatch-record based lookup for repeated js-interop classes.
|
| - var constructor = JS('', '#.constructor', object);
|
| - var interceptor = JS('', '#.get(#)', constructorToInterceptor, constructor);
|
| - if (interceptor != null) return interceptor;
|
| -
|
| - // This takes care of dispatch-record based caching, but not constructor based
|
| - // caching of [UnknownJavaScriptObject]s.
|
| - interceptor = lookupAndCacheInterceptor(object);
|
| -
|
| + var interceptor = lookupAndCacheInterceptor(object);
|
| if (interceptor == null) {
|
| // JavaScript Objects created via object literals and `Object.create(null)`
|
| // are 'plain' Objects. This test could be simplified and the dispatch path
|
| @@ -189,10 +180,6 @@ getNativeInterceptor(object) {
|
| var proto = JS('', 'Object.getPrototypeOf(#)', object);
|
| if (JS('bool', '# == null || # === Object.prototype', proto, proto)) {
|
| return JS_INTERCEPTOR_CONSTANT(PlainJavaScriptObject);
|
| - } else if (JS('bool', 'typeof # == "function"', constructor)) {
|
| - interceptor = JS_INTERCEPTOR_CONSTANT(UnknownJavaScriptObject);
|
| - JS('', '#.set(#, #)', constructorToInterceptor, constructor, interceptor);
|
| - return interceptor;
|
| } else {
|
| return JS_INTERCEPTOR_CONSTANT(UnknownJavaScriptObject);
|
| }
|
| @@ -201,9 +188,6 @@ getNativeInterceptor(object) {
|
| return interceptor;
|
| }
|
|
|
| -var constructorToInterceptor =
|
| - JS('', 'typeof(self.WeakMap) == "undefined" ? new Map() : new WeakMap()');
|
| -
|
| /**
|
| * Data structure used to map a [Type] to the [Interceptor] and constructors for
|
| * that type. It is JavaScript array of 3N entries of adjacent slots containing
|
|
|