Found it. My implementation of NS_IMETHODIMP GetInterface(const nsIID &aIID, void** aInstancePtr) was empty. :">
-----Original Message----- From: dev-embedding-bounces+walter.fettich=lasting...@lists.mozilla.org [mailto:dev-embedding-bounces+walter.fettich=lasting...@lists.mozilla.org] On Behalf Of Walter Fettich Sent: Thursday, January 29, 2009 2:33 PM To: [email protected] Subject: RE: cannot GetContentDOMWindow It seems that in the method GetContentWindow, the class member mDocShellTreeOwner->mTreeOwner is null, which is bad since in mozembed it is valid. Why that happens I don't know and I couldn't figure it out by stepping throught the code. -----Original Message----- From: dev-embedding-bounces+walter.fettich=lasting...@lists.mozilla.org [mailto:dev-embedding-bounces+walter.fettich=lasting...@lists.mozilla.org] On Behalf Of Boris Zbarsky Sent: Wednesday, January 28, 2009 5:34 PM To: [email protected] Subject: Re: cannot GetContentDOMWindow Walter Fettich wrote: > This is because the QI of mDocShell to nsIDOMWindow in GetContentWindow > fails. GetInterface, not QI. ;) > nsCOMPtr<nsIDOMWindow> retval = do_GetInterface(mDocShell, &rv); > > if (NS_FAILED(rv)) return rv; //<------ FAIL! OK. So the only ways that particular do_GetInterface call can fail are: 1) mDocShell is null 2) The docshell is in the middle of being destroyed. 3) There is a serious component registration error (e.g. no DOM script object factory registered). 4) The treeowner doesn't hand back an nsIWebBrowserChrome. 5) Out of memory creating the window and setting it up. Since we got past the NS_ENSURE_STATE(mDocShell), presumably, #1 is out. I'd guess that the issue is #4, most likely. -Boris _______________________________________________ dev-embedding mailing list [email protected] https://lists.mozilla.org/listinfo/dev-embedding _______________________________________________ dev-embedding mailing list [email protected] https://lists.mozilla.org/listinfo/dev-embedding _______________________________________________ dev-embedding mailing list [email protected] https://lists.mozilla.org/listinfo/dev-embedding
