Closed Bug 802739 Opened 12 years ago Closed 12 years ago

Make parent wrapping for DOM bindings fall back to XPConnect for nsISupports classes

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla19

People

(Reporter: peterv, Assigned: peterv)

References

Details

Attachments

(1 file)

Attached patch v1Splinter Review
Bug 799465 made us support non-nsISupports classes as parents, but it breaks using as parents nsISupports classes that can be prefed off, we don't fall back to using XPConnect if calling WrapObject failed because we prefed off the binding.

I found a solution to check for classes (including base classes) having a member, and it should work on the compilers we support (http://stackoverflow.com/questions/9599693/checking-a-member-exists-possibly-in-a-base-class-vs2005-08-version). With this I can check for AddRef/Release/QueryInterface to detect nsISupports classes, and specify fallback to XPConnect for them. These checks should also allow us to remove nativeOwnership from the config file in the future.
Attachment #672427 - Flags: review?(bzbarsky)
This blocks bug 773780 because that patch adds nsINode::WrapObject which doesn't currently wrap anything, because we haven't converted any nodes.
Comment on attachment 672427 [details] [diff] [review]
v1

r=me.  This is getting hairy.  :(
Attachment #672427 - Flags: review?(bzbarsky) → review+
Target Milestone: --- → mozilla19
https://hg.mozilla.org/mozilla-central/rev/03fba4879674
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Flags: in-testsuite-
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: