Page MenuHomePhabricator

VisualEditor: ve.getHash custom hashes are double-hashed
Closed, ResolvedPublic

Description

Our current setup for custom hashing objects to to give them a method .getHash() which looks like this:

T.prototype.getHash = function () {

var someSubsetOfT = // code here
return ve.getHash( someSubsetOfT );

}

and to invoke we use

ve.getHash( instanceOfT );

However ve.getHash( instanceOfT ) === ve.getHash( ve.getHash( someSubsetOfT ) )
which isn't really what we want.

One solution would be to rename getHash to getHashableObject (or something) and have it return just someSubsetOfT directly.


Version: unspecified
Severity: normal

Details

Reference
bz46895

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 1:42 AM
bzimport set Reference to bz46895.

Related URL: https://gerrit.wikimedia.org/r/58235 (Gerrit Change If11071d4b04a01e25102ffb57240882f650ee10d)

Related URL: https://gerrit.wikimedia.org/r/58241 (Gerrit Change I6a9b42facd97fbf49042d3a082121ec93659b9f1)

Ed, did you re-open because there's more to do, or because Jenkins dying meant the changes weren't merged? :-)

Reopened for 58241, but now that is done am closing again.