Re: What's wrong with this small code - getting the DOM

2005-12-01 Thread Vijay
The process crashes on the last line nsresult nres = mEndParent->GetChildNodes(getter_AddRefs(children)); I can see in my vstudio debugger that I am getting an object with this structure: nsIDOMDocument nsISupports __vptr (**some expression which can't be evaluated) (**some expr

Re: What's wrong with this small code - getting the DOM

2005-12-01 Thread Boris Zbarsky
Vijay wrote: Here is the GetDOM function implementation as well... NS_IMETHODIMP CBrowserImpl::GetDOM(nsIDOMDocument* doc) { nsCOMPtr window; nsCOMPtr ndoc = (nsCOMPtr)doc; Er... what? That doesn't look to me like it should do anything sane at all. In particular, after this

Re: What's wrong with this small code - getting the DOM

2005-12-01 Thread Niky Williams
Vijay wrote: Hi All, In the original code of mfcembed, I have changed this method - void CMfcEmbedApp::OnNewBrowser() { CBrowserFrame *pBrowserFrame = CreateNewBrowserFrame(); //Load the HomePage into the browser view //if(pBrowserFrame && (GetStartupPageMode() == 1)) //pBr

Re: What's wrong with this small code - getting the DOM

2005-12-01 Thread Vijay
Here is the GetDOM function implementation as well... NS_IMETHODIMP CBrowserImpl::GetDOM(nsIDOMDocument* doc) { nsCOMPtr window; nsCOMPtr ndoc = (nsCOMPtr)doc; mWebBrowser->GetContentDOMWindow(getter_AddRefs(window)); if (window) { window->GetDocumen

What's wrong with this small code - getting the DOM

2005-12-01 Thread Vijay
Hi All, In the original code of mfcembed, I have changed this method - void CMfcEmbedApp::OnNewBrowser() { CBrowserFrame *pBrowserFrame = CreateNewBrowserFrame(); //Load the HomePage into the browser view //if(pBrowserFrame && (GetStartupPageMode() == 1)) //pBrowserFrame->m_w