[Webkit-unassigned] [Bug 36420] JSC needs an API to allow custom objects to have aprivate GC-accessible properties
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sat Mar 20 18:57:55 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=36420
Maciej Stachowiak <mjs at apple.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #51238|review? |review-
Flag| |
--- Comment #2 from Maciej Stachowiak <mjs at apple.com> 2010-03-20 18:57:55 PST ---
(From update of attachment 51238)
Comments given on IRC:
Docs:
the headerdoc could maybe explain the purpose of this
i.e. that it's a way to hold on to JavaScript values in a way that is safe for
GC
I think probably in the set one would be the best place to explain the purpose
also maybe add a note to JSValueProtect
to make clear that if you want one JS object to keep another alive, you
shouldn't use it, you should use a private property
otherwise you may get uncollectable reference cycles
Error cases:
JSObjectSetPrivateProperty seems to fail silently if the argument is not a
callback object
maybe it should have a boolean return? or raise an exception?
it looks like JSObjectGetPrivateProperty will return garbage when called on a
non-API object
I think it would make more sense to return undefined
Silent failure on delete seems ok
Testing:
you could try harder in the test case to avoid the possibility that a copy of
aHeapRef remains on the stack
I think you should test calling these on non-API objects in the test case
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list