mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-03 18:47:53 +00:00
Bug 754089 - remote mozbrowser's messagemanager shouldn't have parent, r=jlebar
This commit is contained in:
parent
157bb2b743
commit
0bd7a30ad1
@ -2171,19 +2171,6 @@ nsFrameLoader::GetRootContentView(nsIContentView** aContentView)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
static already_AddRefed<nsIDocShell>
|
||||
GetRootDocShell(nsIDocument *aDocument)
|
||||
{
|
||||
nsCOMPtr<nsIWebNavigation> webNav = do_GetInterface(aDocument->GetWindow());
|
||||
nsCOMPtr<nsIDocShellTreeItem> treeItem = do_QueryInterface(webNav);
|
||||
NS_ENSURE_TRUE(treeItem, NULL);
|
||||
|
||||
nsCOMPtr<nsIDocShellTreeItem> rootItem;
|
||||
treeItem->GetRootTreeItem(getter_AddRefs(rootItem));
|
||||
nsCOMPtr<nsIDocShell> rootDocShell = do_QueryInterface(rootItem);
|
||||
return rootDocShell.forget();
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsFrameLoader::EnsureMessageManager()
|
||||
{
|
||||
@ -2212,14 +2199,11 @@ nsFrameLoader::EnsureMessageManager()
|
||||
NS_ENSURE_STATE(cx);
|
||||
|
||||
nsCOMPtr<nsIDOMChromeWindow> chromeWindow =
|
||||
do_QueryInterface(OwnerDoc()->GetWindow());
|
||||
if (!chromeWindow) {
|
||||
nsCOMPtr<nsIDocShell> rootDocShell = GetRootDocShell(OwnerDoc());
|
||||
nsCOMPtr<nsIDOMWindow> rootWindow = do_GetInterface(rootDocShell);
|
||||
chromeWindow = do_GetInterface(rootWindow);
|
||||
}
|
||||
do_QueryInterface(GetOwnerDoc()->GetWindow());
|
||||
nsCOMPtr<nsIChromeFrameMessageManager> parentManager;
|
||||
chromeWindow->GetMessageManager(getter_AddRefs(parentManager));
|
||||
if (chromeWindow) {
|
||||
chromeWindow->GetMessageManager(getter_AddRefs(parentManager));
|
||||
}
|
||||
|
||||
if (ShouldUseRemoteProcess()) {
|
||||
mMessageManager = new nsFrameMessageManager(true,
|
||||
|
@ -249,7 +249,7 @@ public:
|
||||
* Return the document that owns this, or null if we don't have
|
||||
* an owner.
|
||||
*/
|
||||
nsIDocument* OwnerDoc() const
|
||||
nsIDocument* GetOwnerDoc() const
|
||||
{ return mOwnerContent ? mOwnerContent->OwnerDoc() : nsnull; }
|
||||
|
||||
PBrowserParent* GetRemoteBrowser();
|
||||
|
@ -7,6 +7,7 @@
|
||||
let Cu = Components.utils;
|
||||
let Ci = Components.interfaces;
|
||||
let Cc = Components.classes;
|
||||
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
|
||||
function debug(msg) {
|
||||
//dump("BrowserElementChild - " + msg + "\n");
|
||||
|
@ -644,7 +644,7 @@ RenderFrameParent::AllocPLayers(LayerManager::LayersBackend* aBackendType)
|
||||
}
|
||||
|
||||
nsRefPtr<LayerManager> lm =
|
||||
nsContentUtils::LayerManagerForDocument(mFrameLoader->OwnerDoc());
|
||||
nsContentUtils::LayerManagerForDocument(mFrameLoader->GetOwnerDoc());
|
||||
ShadowLayerManager* slm = lm->AsShadowManager();
|
||||
if (!slm) {
|
||||
*aBackendType = LayerManager::LAYERS_NONE;
|
||||
|
Loading…
Reference in New Issue
Block a user