Closed
Bug 1156077
Opened 9 years ago
Closed 5 years ago
Remove the getPropertyDescriptor trap
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
mozilla67
Tracking | Status | |
---|---|---|
firefox67 | --- | fixed |
People
(Reporter: evilpie, Assigned: evilpie)
References
(Depends on 1 open bug, Blocks 1 open bug)
Details
Attachments
(1 file, 1 obsolete file)
getPropertyDescriptor is one of the last non-standard traps that we should probably remove. The concept of "getPropertyDescriptor" never materialized in ES6. Just removing the trap turned out to be somewhat tricky, because Xrays seem to require them. Instead I will try a piece by piece approach. Aside: We have JS_GetPropertyDescriptor as well, which is not a good idea either. Especially because in some places we seem to assume that calling [[GetOwnProperty]] on the whole proto-chain of an object is the same as calling [[Get]]. This however is not true in some cases like TypedArrays, where all calls to the [[Get]] trap for indexed elements end.
Updated•8 years ago
|
Keywords: dev-doc-needed
Updated•8 years ago
|
Keywords: site-compat
Assignee | ||
Updated•8 years ago
|
Keywords: dev-doc-needed,
site-compat
Assignee | ||
Comment 1•8 years ago
|
||
So we are now at a point where removing getPropertyDescriptor is feasible. Right now my patches actually keep getPropertyDescriptor internally on Xray/Sandbox, because those need weird behavior. Maybe this can be resolved as well.
Assignee | ||
Comment 2•6 years ago
|
||
With bug 1053271 close to landing we can finally start working on removing this code. I think without XPCWN Xrays the only small wrinkle might be the DOM Sandbox code.
Assignee | ||
Updated•6 years ago
|
Attachment #8964594 -
Attachment is obsolete: true
Assignee | ||
Comment 3•5 years ago
|
||
With bug 1363208 landing, we should finally be able to remove this. The only real user that I am aware of is the XPC Sandbox. Just removing SandboxProxyHandler::getPropertyDescriptor might work.
Assignee | ||
Comment 4•5 years ago
|
||
Assignee | ||
Comment 5•5 years ago
|
||
I am bit surprised myself, but just removing the getPropertyDescriptor trap seems to mostly work.
The only real special case here is the XPC Sandbox, which I changed to keep using its getPropertyDescriptorImpl.
testSetPropertyIgnoringNamedGetter.cpp didn't even really need its getPropertyDescriptor implementation.
Pushed by evilpies@gmail.com: https://hg.mozilla.org/integration/autoland/rev/46790408df7f Remove the non-standard Proxy getPropertyDescriptor trap. r=bzbarsky,jorendorff
Comment 7•5 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 5 years ago
status-firefox67:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
You need to log in
before you can comment on or make changes to this bug.
Description
•