Closed
Bug 1957847
Opened 1 year ago
Closed 1 year ago
Convert more JS holders to use Hold/DropJSObjectsWithKey APIs where appropriate
Categories
(Core :: XPCOM, enhancement)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
People
(Reporter: jonco, Assigned: jonco)
References
Details
Attachments
(3 files)
Following on from bug 1953167, we can convert more JS holders to use the new Hold/DropJSObjectsWithKey APIs, where approriate. This should be more efficient for holders that are always added to the map and call HoldJSObjects during initialization.
Comment 1•1 year ago
|
||
Promise and CallbackTimeoutHandler might be good candidates. They are not WrapperCached, so the preserving wrapper won't trigger the other holdJSObjects call.
| Assignee | ||
Comment 2•1 year ago
|
||
This adds static assertions that the Add/DropJSHoldersWithKey APIs are not used
for wrapper cached objects, and runtime assertions that these APIs are not used
for objects that were previously used with the original Add/DropJSHolders APIs.
Unfortunately it's not possible to check the inverse of the latter case.
Updated•1 year ago
|
Assignee: nobody → jcoppeard
Status: NEW → ASSIGNED
| Assignee | ||
Comment 3•1 year ago
|
||
| Assignee | ||
Comment 4•1 year ago
|
||
| Assignee | ||
Updated•1 year ago
|
Keywords: leave-open
Updated•1 year ago
|
Summary: Convert more JS holders to use Hold/DropJSObjectsWithKey APIs where approriate → Convert more JS holders to use Hold/DropJSObjectsWithKey APIs where appropriate
Pushed by jcoppeard@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/82cd5111cd88
Part 1: Add assertions to catch misuse of Add/DropJSHolders APIs r=smaug
https://hg.mozilla.org/integration/autoland/rev/c94929a03423
Part 2: Use Add/DropJSHoldersWithKey APIs for Promise r=smaug
https://hg.mozilla.org/integration/autoland/rev/4ee747773a72
Part 3: Use Add/DropJSHoldersWithKey APIs for CallbackTimeoutHandler r=smaug
Comment 6•1 year ago
|
||
| bugherder | ||
| Assignee | ||
Updated•1 year ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•