Open
Bug 599139
Opened 14 years ago
Updated 2 years ago
GetPropertyNames should be able to skip SHARED|PERMANENT inherited properties
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
NEW
People
(Reporter: jimb, Unassigned)
References
(Blocks 1 open bug)
Details
At the moment, calling GetPropertyNames with the JSITER_OWNONLY flag *does* include inherited SHARED|PERMANENT properties. However, for operations like JSObject::sealOrFreeze(true), we don't want to mark prototypes' properties read-only.
There should be a JSITER_OWNANDSHAREDPERMANENTONLY flag; all code passing JSITER_OWNONLY should be changed to use it. There should *then* be a JSITER_OWNONLY flag (underscore for consistency) that skips inherited SHARED|PERMANENT properties. Then, sealOrFreeze can be changed to use the latter.
Comment 1•14 years ago
|
||
Does this mean that properties being SHARED|PERMANENT now becomes non-transparent to the script? That might mean we have to stop using them in the DOM, if so (since I believe webidl currently calls for all DOM properties to be own properties...)
Comment 2•14 years ago
|
||
SHARED|PERMANENT has never been non-transparent to script -- make a DOM object a prototype of another object, then try hasOwnProperty("childNodes") or whatever on that object. This shared-permanent oddity will die soon, I very much hope for 2.x.
Assignee | ||
Updated•10 years ago
|
Assignee: general → nobody
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•