Closed Bug 802739 Opened 7 years ago Closed 7 years ago
Make parent wrapping for DOM bindings fall back to XPConnect for ns
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+
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.