mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1040561 - Part 3. Return nullptr when CreateContentBridgeParent fails. r=khuey
This commit is contained in:
parent
6e04110b54
commit
2a43155bba
@ -892,7 +892,10 @@ ContentParent::RecvCreateChildProcess(const IPCTabContext& aContext,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!cp) {
|
if (!cp) {
|
||||||
return false;
|
*aId = 0;
|
||||||
|
*aIsForApp = false;
|
||||||
|
*aIsForBrowser = false;
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
*aId = cp->ChildID();
|
*aId = cp->ChildID();
|
||||||
@ -942,13 +945,15 @@ ContentParent::CreateBrowserOrApp(const TabContext& aContext,
|
|||||||
nsRefPtr<nsIContentParent> constructorSender;
|
nsRefPtr<nsIContentParent> constructorSender;
|
||||||
if (isInContentProcess) {
|
if (isInContentProcess) {
|
||||||
MOZ_ASSERT(aContext.IsBrowserElement());
|
MOZ_ASSERT(aContext.IsBrowserElement());
|
||||||
constructorSender = CreateContentBridgeParent(aContext, initialPriority);
|
constructorSender =
|
||||||
|
CreateContentBridgeParent(aContext, initialPriority);
|
||||||
} else {
|
} else {
|
||||||
if (aOpenerContentParent) {
|
if (aOpenerContentParent) {
|
||||||
constructorSender = aOpenerContentParent;
|
constructorSender = aOpenerContentParent;
|
||||||
} else {
|
} else {
|
||||||
constructorSender = GetNewOrUsedBrowserProcess(aContext.IsBrowserElement(),
|
constructorSender =
|
||||||
initialPriority);
|
GetNewOrUsedBrowserProcess(aContext.IsBrowserElement(),
|
||||||
|
initialPriority);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (constructorSender) {
|
if (constructorSender) {
|
||||||
@ -1143,6 +1148,9 @@ ContentParent::CreateContentBridgeParent(const TabContext& aContext,
|
|||||||
&isForBrowser)) {
|
&isForBrowser)) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
if (id == 0) {
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
if (!child->CallBridgeToChildProcess(id)) {
|
if (!child->CallBridgeToChildProcess(id)) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user