Closed Bug 799465 Opened 8 years ago Closed 8 years ago

Add complete support for non-nsISupports objects in new DOM bindings

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla19

People

(Reporter: peterv, Assigned: peterv)

Details

Attachments

(3 files)

Two things still assume that the native is an nsISupports: parent wrapping and anything related to the CC (traversal of the binding and wrapper preservation).
This was my testcase for the other two patches.
Attachment #669522 - Flags: review?(ehsan)
Comment on attachment 669522 [details] [diff] [review]
Make AudioBuffer not inherit from nsISupports v1

Review of attachment 669522 [details] [diff] [review]:
-----------------------------------------------------------------

Yay!
Attachment #669522 - Flags: review?(ehsan) → review+
Can I do this for the rest of the web audio objects as well?
Sure, if they only have nsISupports to deal with CC it'd be good to do that. If you run into any trouble let us know, but it should work with these patches.
(In reply to comment #6)
> Sure, if they only have nsISupports to deal with CC it'd be good to do that. If
> you run into any trouble let us know, but it should work with these patches.

OK will do.  (I'll wait for this to land first)
Comment on attachment 669520 [details] [diff] [review]
Fix CC traversal and wrapper preservation v1

r=me assuming NoteNativeRoot is the right thing to call there at the end.
Attachment #669520 - Flags: review?(bzbarsky) → review+
Comment on attachment 669521 [details] [diff] [review]
Allow non-nsISupports object to be parents v1

>+inline T
>+GetParentPointer(T aObject)

I would prefer that as:

  inline T*
  GetParentPointer(T* aObject)

so we definitely get useful compile failures if a type that's not a pointer and not a ParentObject is passed to GetParentPointer.

r=me with that.  Very nice!
Attachment #669521 - Flags: review?(bzbarsky) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/7e7fc42021c1
https://hg.mozilla.org/integration/mozilla-inbound/rev/7154061ddc00
https://hg.mozilla.org/integration/mozilla-inbound/rev/a484a3a904da
https://hg.mozilla.org/integration/mozilla-inbound/rev/3044539fec87

I ended up disabling CC support for 'owned' natives, there's no easy way to implement a CC participant for those right now. I'll file a follow-up bug for that.
Target Milestone: --- → mozilla19
https://hg.mozilla.org/mozilla-central/rev/c1bbabd184b3
https://hg.mozilla.org/mozilla-central/rev/a1c63e595136
https://hg.mozilla.org/mozilla-central/rev/b4ecedf655f2
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.