Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Unified Diff: src/object-observe.js

Issue 1149863005: Move hash code from hidden string to a private symbol (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix merge Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/mips64/macro-assembler-mips64.cc ('k') | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/object-observe.js
diff --git a/src/object-observe.js b/src/object-observe.js
index 219d7b72d521c3b2b9cbde526c04ce06294dd829..56859a1c97ba9f7729c2b8fb821c6142d6fdb7f1 100644
--- a/src/object-observe.js
+++ b/src/object-observe.js
@@ -208,28 +208,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;
@@ -340,13 +342,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));
}
« no previous file with comments | « src/mips64/macro-assembler-mips64.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698