Open
Bug 452961
Opened 16 years ago
Updated 2 years ago
make it easier to use DOM windows/nodes as hash keys (for JS objects)
Categories
(Core :: DOM: Core & HTML, enhancement, P5)
Core
DOM: Core & HTML
Tracking
()
REOPENED
People
(Reporter: zeniko, Unassigned)
References
Details
Proposal: Add an ID/hashCode (AString or long) attribute to their interfaces.
We need to associate data with DOM windows and DOM nodes e.g. for Session Restore. However the windows/nodes themselves can't be used as keys, since their toString representation is always the same and since they don't provide an ID/hashCode themselves.
The current options seem thus to be to either set an attribute on the node (won't persist through XPCNativeWrappers though and leaks e.g. out of XPCOM components) or to keep two arrays in sync and then perform linear searches through the "hash"-array (risk of arrays getting out of sync and of accidentally leaking memory when holding on too long to the DOM objects).
Updated•16 years ago
|
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → DUPLICATE
Reporter | ||
Comment 2•16 years ago
|
||
Not a DUPE, since implementing hashCode isn't the only acceptable solution for fixing this bug (see e.g. the alternative suggestion by bug 307795 comment #2).
Comment 3•6 years ago
|
||
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046
Move all DOM bugs that haven’t been updated in more than 3 years and has no one currently assigned to P5.
If you have questions, please contact :mdaly.
Priority: -- → P5
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•