Index: src/object-observe.js |
diff --git a/src/object-observe.js b/src/object-observe.js |
index c90c6c7af1d058387ed6482be045009c4587a25a..dd190d7e5b77bae6bfe2627ddb431aee5fa4a6ca 100644 |
--- a/src/object-observe.js |
+++ b/src/object-observe.js |
@@ -200,28 +200,30 @@ function ObjectInfoGetOrCreate(object) { |
performingCount: 0, |
}; |
%WeakCollectionSet(GetObservationStateJS().objectInfoMap, |
- object, objectInfo); |
+ object, objectInfo, $getHash(object)); |
} |
return objectInfo; |
} |
function ObjectInfoGet(object) { |
- return %WeakCollectionGet(GetObservationStateJS().objectInfoMap, object); |
+ return %WeakCollectionGet(GetObservationStateJS().objectInfoMap, object, |
+ $getHash(object)); |
} |
function ObjectInfoGetFromNotifier(notifier) { |
return %WeakCollectionGet(GetObservationStateJS().notifierObjectInfoMap, |
- notifier); |
+ notifier, $getHash(notifier)); |
} |
function ObjectInfoGetNotifier(objectInfo) { |
if (IS_NULL(objectInfo.notifier)) { |
- objectInfo.notifier = { __proto__: notifierPrototype }; |
+ var notifier = { __proto__: notifierPrototype }; |
+ objectInfo.notifier = notifier; |
%WeakCollectionSet(GetObservationStateJS().notifierObjectInfoMap, |
- objectInfo.notifier, objectInfo); |
+ notifier, objectInfo, $getHash(notifier)); |
} |
return objectInfo.notifier; |
@@ -332,13 +334,14 @@ function ConvertAcceptListToTypeMap(arg) { |
// priority. When a change record must be enqueued for the callback, it |
// normalizes. When delivery clears any pending change records, it re-optimizes. |
function CallbackInfoGet(callback) { |
- return %WeakCollectionGet(GetObservationStateJS().callbackInfoMap, callback); |
+ return %WeakCollectionGet(GetObservationStateJS().callbackInfoMap, callback, |
+ $getHash(callback)); |
} |
function CallbackInfoSet(callback, callbackInfo) { |
%WeakCollectionSet(GetObservationStateJS().callbackInfoMap, |
- callback, callbackInfo); |
+ callback, callbackInfo, $getHash(callback)); |
} |