зеркало из https://github.com/mozilla/gecko-dev.git
bug 309702 handle a missing presshell gracefully (happens for display:none
iframes) r+sr=bz
This commit is contained in:
Родитель
ed6d00a19d
Коммит
e53c23d646
|
@ -98,7 +98,13 @@ nsPluginStreamListener::OnStartRequest(nsIRequest* request, nsISupports *ctxt)
|
|||
nsIContent* embed = mPluginDoc->GetPluginContent();
|
||||
|
||||
// Now we have a frame for our <embed>, start the load
|
||||
nsIFrame* frame = mDocument->GetShellAt(0)->GetPrimaryFrameFor(embed);
|
||||
nsIPresShell* shell = mDocument->GetShellAt(0);
|
||||
if (!shell) {
|
||||
// Can't instantiate w/o a shell
|
||||
return NS_BINDING_ABORTED;
|
||||
}
|
||||
|
||||
nsIFrame* frame = shell->GetPrimaryFrameFor(embed);
|
||||
if (!frame) {
|
||||
return rv;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче