зеркало из https://github.com/mozilla/gecko-dev.git
Bug 513354 - Destroy the baseWindow on tab destruction, r=bs
This commit is contained in:
Родитель
ddc3652fe6
Коммит
06eac01810
|
@ -998,6 +998,8 @@ nsFrameLoader::Destroy()
|
|||
#ifdef MOZ_IPC
|
||||
if (mChildProcess) {
|
||||
mChildProcess->SetOwnerElement(nsnull);
|
||||
ContentProcessParent::GetSingleton()->SendPIFrameEmbeddingDestructor(mChildProcess);
|
||||
mChildProcess = nsnull;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ namespace dom {
|
|||
|
||||
class TabParent;
|
||||
|
||||
class ContentProcessParent : private PContentProcessParent,
|
||||
class ContentProcessParent : public PContentProcessParent,
|
||||
public base::WaitableEventWatcher::Delegate,
|
||||
public nsIObserver
|
||||
{
|
||||
|
|
|
@ -66,7 +66,6 @@ parent:
|
|||
sendEvent(RemoteDOMEvent aEvent);
|
||||
child:
|
||||
createWidget(MagicWindowHandle parentWidget);
|
||||
destroyWidget();
|
||||
|
||||
loadURL(nsCString uri);
|
||||
|
||||
|
|
|
@ -276,7 +276,7 @@ TabChild::RecvcreateWidget(const MagicWindowHandle& parentWidget)
|
|||
}
|
||||
|
||||
bool
|
||||
TabChild::RecvdestroyWidget()
|
||||
TabChild::destroyWidget()
|
||||
{
|
||||
nsCOMPtr<nsIBaseWindow> baseWindow = do_QueryInterface(mWebNav);
|
||||
if (baseWindow)
|
||||
|
@ -287,11 +287,11 @@ TabChild::RecvdestroyWidget()
|
|||
|
||||
TabChild::~TabChild()
|
||||
{
|
||||
destroyWidget();
|
||||
nsCOMPtr<nsIWebBrowser> webBrowser = do_QueryInterface(mWebNav);
|
||||
if (webBrowser) {
|
||||
webBrowser->SetContainerWindow(nsnull);
|
||||
}
|
||||
// TODObsmedberg: destroy the window!
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
|
@ -72,6 +72,7 @@ class TabChild : public PIFrameEmbeddingChild,
|
|||
public:
|
||||
TabChild();
|
||||
virtual ~TabChild();
|
||||
bool destroyWidget();
|
||||
nsresult Init();
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
@ -82,7 +83,6 @@ public:
|
|||
NS_DECL_NSIWEBBROWSERCHROMEFOCUS
|
||||
|
||||
virtual bool RecvcreateWidget(const MagicWindowHandle& parentWidget);
|
||||
virtual bool RecvdestroyWidget();
|
||||
virtual bool RecvloadURL(const nsCString& uri);
|
||||
virtual bool Recvmove(const PRUint32& x,
|
||||
const PRUint32& y,
|
||||
|
|
|
@ -69,6 +69,14 @@
|
|||
frameLoader.sendCrossProcessMouseEvent("mousedown", x, y, 0, 1, 0, false);
|
||||
frameLoader.sendCrossProcessMouseEvent("mouseup", x, y, 0, 1, 0, false);
|
||||
}
|
||||
|
||||
function openWindow() {
|
||||
window.open('chrome://global/content/test-ipc.xul', '_blank', 'chrome,resizable,width=800,height=800');
|
||||
}
|
||||
|
||||
function closeWindow() {
|
||||
window.close();
|
||||
}
|
||||
</script>
|
||||
|
||||
<toolbar id="controls">
|
||||
|
@ -77,6 +85,8 @@
|
|||
<textbox onchange="loadURL(this.value)" flex="1" id="URL"/>
|
||||
<toolbarbutton onclick="restart()" label="Recover"/>
|
||||
<toolbarbutton onclick="randomClick()" label="random click"/>
|
||||
<toolbarbutton onclick="openWindow()" label="open new window"/>
|
||||
<toolbarbutton onclick="closeWindow()" label="close this window"/>
|
||||
</toolbar>
|
||||
|
||||
<browser type="content" src="http://www.google.com/" flex="1" id="page" remote="true"
|
||||
|
|
Загрузка…
Ссылка в новой задаче