if (!moz->destroy_cb) return; memset(&cbinfo, 0, sizeof(cbinfo)); cbinfo.reason = Pt_CB_MOZ_DESTROY; cb = moz->destroy_cb; PtInvokeCallbackList(cb, (PtWidget_t *)mEmbed, &cbinfo);
RemoveEventListener();    nsCOMPtr<nsIDocShellTreeItem> browserAsItem; browserAsItem = do_QueryInterface(mWebBrowser);  nsCOMPtr<nsIDocShellTreeOwner> treeOwner; browserAsItem->GetTreeOwner(getter_AddRefs(treeOwner)); NS_ASSERTION(treeOwner, "failed to get tree owner");  nsCOMPtr<nsIDocShellTreeItem> contentItem; treeOwner->GetPrimaryContentShell(getter_AddRefs(contentItem)); NS_ASSERTION(contentItem, "failed to get content item");   contentItem->SetTreeOwner(nsnull);  webProgress = do_GetInterface(docShell);  webProgress->RemoveProgressListener(mContentProgress);     browserAsItem = do_QueryInterface(mWebBrowser); browserAsItem->SetTreeOwner(nsnull);   nsCOMPtr<nsIBaseWindow> webBrowserBaseWindow = do_QueryInterface(mWebBrowser); webBrowserBaseWindow->Destroy();  mMozWindow = 0; mWebBrowser = nsnull; mEmbed = nsnull;
PhMozEmbedListenerImpl::Destroy(void){	PtMozillaWidget_t *moz = (PtMozillaWidget_t *)mEmbed;	PtCallbackList_t *cb;	PtCallbackInfo_t cbinfo;	if (!moz->destroy_cb)		return;	memset(&cbinfo, 0, sizeof(cbinfo));	cbinfo.reason = Pt_CB_MOZ_DESTROY;	cb = moz->destroy_cb;	PtInvokeCallbackList(cb, (PtWidget_t *)mEmbed, &cbinfo);}