Ensure Private Fields are preserved through transplatation
Categories
(Core :: JavaScript Engine, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox81 | --- | fixed |
People
(Reporter: mgaudet, Assigned: mgaudet)
References
Details
Attachments
(1 file)
Private fields should be preserved when an object is transplanted.
Assignee | ||
Comment 1•5 years ago
|
||
As part of DOM node adoption they are transplanted, and their expando chains are copied over.
This copying uses JS_CopyPropertiesFrom, which until this patch, cannot see
private fields as they are excluded from property iteration. This patch adds
property iteration for private fields, and renames JS_CopyPropertiesFrom to
JS_CopyOwnPropertiesAndPrivateFields which is more accurate.
The users of this method are all doing object manipulation in ways where
preserving the copied private field is the better default.
In addition to testing DOM nodes explicitly, this patch also adds a jit-test
which uses transplantableObject to test similar things with FakeDOMObjects.
Updated•5 years ago
|
Comment 4•5 years ago
|
||
Made a quick fix for the eslint failures seen here:
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=312762510&repo=autoland&lineNumber=508
These were "prettier" issues so they were fixed by running the lint tool on the file.
Comment 5•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/eda366bce802
https://hg.mozilla.org/mozilla-central/rev/e67d65bd08a4
Description
•