Closed Bug 837645 Opened 12 years ago Closed 12 years ago

Support 'any' values in dictionaries

Categories

(Core :: DOM: Core & HTML, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla21

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

We need to root to fix this.
Attachment #709692 - Flags: review?(peterv)
Attachment #709692 - Flags: review?(bugs)
Comment on attachment 709692 [details] [diff] [review] Support 'any' values in sequences and dictionaries. >+class RootedJSValue { Not sure about conventions in this file, but { should be in the next line, and parameters should in form aFoo
Attachment #709692 - Flags: review?(bugs) → review+
Comment on attachment 709692 [details] [diff] [review] Support 'any' values in sequences and dictionaries. Review of attachment 709692 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/bindings/BindingDeclarations.h @@ +258,5 @@ > +private: > + // Don't allow copy-construction of these objects, because it'll do the wrong > + // thing with our flag mCx. > + RootedJSValue(const RootedJSValue&) MOZ_DELETE; > + Trailing whitespace
Conventions so far are what I make up, but yeah, will do. So I thought of one issue with this approach: I'll have to change my setTimeout patch to individually root all of the arguments to setTimeout instead of using an array rooter as I do now. I can probably live with that, because we can't use the array rooters in binding code, sadly.
Hrm. But then I'll need a JSContext in the C++ code... I wonder whether I should only support this for dictionaries for now and keep sequences as they were. I think I'm going to go ahead and do that, in fact.
Attached patch With just dictionaries (deleted) — Splinter Review
Attachment #709850 - Flags: review?(peterv)
Attachment #709692 - Attachment is obsolete: true
Attachment #709692 - Flags: review?(peterv)
Attachment #709850 - Flags: review?(peterv) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/2e0f4418ad0c but I forgot to change the commit message to only talk about dictionaries... :(
Flags: in-testsuite+
Summary: Support 'any' values in dictionaries and sequences → Support 'any' values in dictionaries
Whiteboard: [need review]
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: