File tree Expand file tree Collapse file tree 1 file changed +6
-18
lines changed
Expand file tree Collapse file tree 1 file changed +6
-18
lines changed Original file line number Diff line number Diff line change 22// Remove "use strict"; from transpiled module until
33// https://bugs.webkit.org/show_bug.cgi?id=138038 is fixed
44
5- import { EmptyObject , lookupDescriptor , symbol } from 'ember-utils' ;
5+ import {
6+ EmptyObject ,
7+ lookupDescriptor ,
8+ symbol ,
9+ HAS_NATIVE_WEAKMAP
10+ } from 'ember-utils' ;
611import isEnabled from './features' ;
712import { protoMethods as listenerMethods } from './meta_listeners' ;
813import { runInDebug , assert } from './debug' ;
@@ -448,17 +453,6 @@ if (isEnabled('mandatory-setter')) {
448453 } ;
449454}
450455
451- const HAS_NATIVE_WEAKMAP = ( function ( ) {
452- // detect if `WeakMap` is even present
453- let hasWeakMap = typeof WeakMap === 'function' ;
454- if ( ! hasWeakMap ) { return false ; }
455-
456- let instance = new WeakMap ( ) ;
457- // use `Object`'s `.toString` directly to prevent us from detecting
458- // polyfills as native weakmaps
459- return Object . prototype . toString . call ( instance ) === '[object WeakMap]' ;
460- } ) ( ) ;
461-
462456let setMeta , peekMeta ;
463457
464458// choose the one appropriate for given platform
@@ -472,12 +466,6 @@ if (HAS_NATIVE_WEAKMAP) {
472466 } ;
473467
474468 peekMeta = function WeakMap_peekMeta ( obj ) {
475- runInDebug ( ( ) => counters . peekCalls ++ ) ;
476-
477- return metaStore . get ( obj ) ;
478- } ;
479-
480- peekMeta = function WeakMap_peekParentMeta ( obj ) {
481469 let pointer = obj ;
482470 let meta ;
483471 while ( pointer ) {
You can’t perform that action at this time.
0 commit comments