Closed
Bug 1141916
Opened 9 years ago
Closed 8 years ago
support [ChromeOnly] on dictionary members
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla49
Tracking | Status | |
---|---|---|
firefox49 | --- | fixed |
People
(Reporter: heycam, Assigned: heycam)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
1.85 KB,
patch
|
peterv
:
review+
|
Details | Diff | Splinter Review |
7.84 KB,
patch
|
peterv
:
review+
|
Details | Diff | Splinter Review |
In bug 1123523 I want to add a [ChromeOnly] dictionary member to MutationObserverInit, for an observation option that should only be available to chrome code. The behaviour I'll go for is: * when converting from a JS object in non-chrome code, [ChromeOnly] dictionary members are treated as if they weren't specified * when converting to a JS object in non-chrome code, [ChromeOnly] dictionary members never get a property set on the JS object * [ChromeOnly] can't be used on required dictionary members * [ChromeOnly] can't be used on a dictionary member if there is a [Cached] or [StoreInSlot] attribute somewhere whose type ultimately includes that dictionary member -- otherwise this would mean whether the property exists on the JS object depends on whether chrome or non-chrome code happens to get the attribute first
Assignee | ||
Comment 1•9 years ago
|
||
Attachment #8575769 -
Flags: review?(peterv)
Assignee | ||
Comment 2•9 years ago
|
||
Attachment #8575770 -
Flags: review?(peterv)
Comment 3•9 years ago
|
||
The plan in comment 0 sounds good; we should be able to drop the fourth bullet point once we fix bug 946906. Maybe file a followup on that?
Assignee | ||
Comment 4•9 years ago
|
||
Let me know if (and how) I should add a test for this.
Assignee | ||
Updated•9 years ago
|
Comment 5•9 years ago
|
||
Comment on attachment 8575770 [details] [diff] [review] Part 2: Support [ChromeOnly] on dictionary members. Review of attachment 8575770 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/bindings/parser/WebIDL.py @@ +3317,5 @@ > + return (True, location) > + if dictionary.parent: > + (contains, location) = dictionaryContainsChromeOnlyMember(dictionary.parent) > + if contains: > + return (True, location) Shouldn't this be a while loop? dictionary = type.inner while dictionary: ... dictionary = dictionary.parent
Attachment #8575770 -
Flags: review?(peterv) → review+
Updated•9 years ago
|
Attachment #8575769 -
Flags: review?(peterv) → review+
Comment 7•8 years ago
|
||
> Shouldn't this be a while loop?
Yes, it should.
Pushed by bzbarsky@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/f34508f1a4a0 Part 1: Store extended attributes on IDLArguments. r=peterv https://hg.mozilla.org/integration/mozilla-inbound/rev/b4555556428e Part 2: Support [ChromeOnly] on dictionary members. r=peterv
Comment 9•8 years ago
|
||
Added a webidl parser test that would catch the bug comment 5 pointed out, fixed the code, and checked this in.
Updated•8 years ago
|
Flags: needinfo?(cam)
Comment 10•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/f34508f1a4a0 https://hg.mozilla.org/mozilla-central/rev/b4555556428e
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox49:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
Comment 11•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/f34508f1a4a0 https://hg.mozilla.org/mozilla-central/rev/b4555556428e
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
•