Closed Bug 873337 Opened 12 years ago Closed 12 years ago

Change the order of JS-to-native conversion setup so that we construct ${declName} before ${holderName}

Categories

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

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla24

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

Details

Attachments

(1 file)

This is sort of a followup to bug 868715. In that bug I had to add SetDictionary and SetSequence methods because we construct the decl after the holder... except when they're optional, in which case we construct the decl before the holder. I didn't do this in bug 868715 because I was thinking of trying to always pass the decl as a constructor argument to the holder, but that's silly. We should just pass it explicitly as needed. This will make it easier to teach the rooting analysis about our CustomAutoRooter holders, will make those easier to use outside of binding code, and should simplify our union code a bit.
Comment on attachment 750868 [details] [diff] [review] Change the order of the decl and holder in js-to-native conversions to clean up the code some. Now the holder always comes after the decl. a new patch coming
Attachment #750868 - Flags: review?(bugs)
Attachment #750868 - Flags: review?(bugs)
Comment on attachment 750868 [details] [diff] [review] Change the order of the decl and holder in js-to-native conversions to clean up the code some. Now the holder always comes after the decl. > public: >- explicit SequenceRooter(JSContext *cx MOZ_GUARD_OBJECT_NOTIFIER_PARAM) >+ SequenceRooter(JSContext *cx, FallibleTArray<T>* aSequence Could you update cx to use same coding style as aSequence. Odd to have two different styles in one ctor. Same also elsewhere. Starting from the beginning...
Attachment #750868 - Flags: review?(bugs) → review+
> Could you update cx to use same coding style as aSequence. Done. https://hg.mozilla.org/integration/mozilla-inbound/rev/13b24e2f6319
Flags: in-testsuite-
Target Milestone: --- → mozilla24
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
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: