Chromium Code Reviews| Index: src/object-observe.js |
| diff --git a/src/object-observe.js b/src/object-observe.js |
| index 3dfc35e8e5ec9e36ed621ca9be7d30ef3f3c091b..6ac65091591429a95d678aeac5a43fa3f6429950 100644 |
| --- a/src/object-observe.js |
| +++ b/src/object-observe.js |
| @@ -200,28 +200,29 @@ 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)); |
|
adamk
2015/05/21 19:11:32
Style nit: over 80 characters here and below.
Erik Corry
2015/05/21 20:19:02
I've come to rely too much on git cl format.
Erik Corry
2015/05/22 06:20:25
Done.
|
| } |
| 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 +333,13 @@ 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)); |
| } |