Closed
Bug 961208
Opened 11 years ago
Closed 11 years ago
Change WebIDL DoNewResolve hooks to take a JSPropertyDescriptor
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla29
People
(Reporter: bzbarsky, Assigned: bzbarsky)
References
Details
(Whiteboard: [qa-])
Attachments
(2 files, 1 obsolete file)
(deleted),
patch
|
bholley
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
bholley
:
review+
|
Details | Diff | Splinter Review |
Then they can easily control what property flags should be used for the property.
![]() |
Assignee | |
Comment 1•11 years ago
|
||
Please verify my verification that the callees are OK with this!
Attachment #8361933 -
Flags: review?(bobbyholley+bmo)
![]() |
Assignee | |
Comment 2•11 years ago
|
||
Attachment #8361934 -
Flags: review?(bobbyholley+bmo)
Comment 3•11 years ago
|
||
Comment on attachment 8361933 [details] [diff] [review] part 1. When doing a DoNewResolve for Xrays, pass the Xray, not the underlying object, to DoNewResolve, in case people want to do permissions checks on the object. Review of attachment 8361933 [details] [diff] [review]: ----------------------------------------------------------------- Navigator and ObjectLoadingContent seem fine. Are those the only two?
Attachment #8361933 -
Flags: review?(bobbyholley+bmo) → review+
Comment 4•11 years ago
|
||
Comment on attachment 8361934 [details] [diff] [review] part 2. Change the WebIDL DoNewResolve hook signature to take a JSPropertyDescriptor. Review of attachment 8361934 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/bindings/Codegen.py @@ +6004,4 @@ > " return true;\n" > "}\n" > + "if (!JS_DefinePropertyById(cx, obj, id, desc.value(),\n" > + " desc.getter(), desc.setter(),\n" Note that this will cause the class getter to be invoked, if one exists (if you want no getter, you need to pass JS_PropertyStub). But this isn't a behavioral change, and is probably fine.
Attachment #8361934 -
Flags: review?(bobbyholley+bmo) → review+
![]() |
Assignee | |
Comment 5•11 years ago
|
||
> Navigator and ObjectLoadingContent seem fine. Are those the only two? So far, yes. > Note that this will cause the class getter to be invoked, if one exists Yeah, these are WebIDL objects, so they never have those. ;)
![]() |
Assignee | |
Comment 6•11 years ago
|
||
Attachment #8363094 -
Flags: review?(bobbyholley+bmo)
![]() |
Assignee | |
Updated•11 years ago
|
Attachment #8361934 -
Attachment is obsolete: true
Comment 7•11 years ago
|
||
Comment on attachment 8363094 [details] [diff] [review] part 2. Change the WebIDL DoNewResolve hook signature to take a JSPropertyDescriptor. Review of attachment 8363094 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/bindings/Codegen.py @@ +6004,5 @@ > " return true;\n" > "}\n" > + "// If desc.value() is undefined, then the DoNewResolve call\n" > + "// has already defined it on the object. Don't try to also\n" > + "// define it.\n" I'm assuming more comments will come later when we hook this stuff up for window?
Attachment #8363094 -
Flags: review?(bobbyholley+bmo) → review+
![]() |
Assignee | |
Comment 8•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/c7b17f121aee https://hg.mozilla.org/integration/mozilla-inbound/rev/38aea88101ba
Flags: in-testsuite-
Whiteboard: [need review]
Target Milestone: --- → mozilla29
Comment 9•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/c7b17f121aee https://hg.mozilla.org/mozilla-central/rev/38aea88101ba
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Updated•11 years ago
|
Whiteboard: [qa-]
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•