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

RESOLVED FIXED in mozilla19

Status

()

defect
RESOLVED FIXED
7 years ago
3 months ago

People

(Reporter: peterv, Assigned: peterv)

Tracking

Trunk
mozilla19
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments)

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).
Assignee

Comment 3

7 years ago
This was my testcase for the other two patches.
Attachment #669522 - Flags: review?(ehsan)

Comment 4

7 years ago
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+

Comment 5

7 years ago
Can I do this for the rest of the web audio objects as well?
Assignee

Comment 6

7 years ago
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.

Comment 7

7 years ago
(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+
Assignee

Comment 10

7 years ago
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: 7 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.