Fix bug 33111, crash when creating an applet element from JS, now we no longer crash but dynamically creating applets doesn't work yet.
git-svn-id: svn://10.0.0.236/trunk@70267 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
97e9d36acb
commit
afd6b8cd47
@ -320,12 +320,16 @@ if (NS_SUCCEEDED(rv)) {
|
||||
return rv;
|
||||
|
||||
// 2. get the plugin instance corresponding to this element.
|
||||
nsIPresShell* shell = mInner.mDocument->GetShellAt(0);
|
||||
if (nsnull == shell)
|
||||
return NS_ERROR_FAILURE;
|
||||
nsIFrame* frame = nsnull;
|
||||
shell->GetPrimaryFrameFor(mInner.mContent, &frame);
|
||||
NS_RELEASE(shell);
|
||||
nsIPresShell* shell = nsnull;
|
||||
if (mInner.mDocument)
|
||||
shell = mInner.mDocument->GetShellAt(0);
|
||||
|
||||
nsIFrame* frame = nsnull;
|
||||
|
||||
if (shell) {
|
||||
shell->GetPrimaryFrameFor(mInner.mContent, &frame);
|
||||
NS_RELEASE(shell);
|
||||
}
|
||||
|
||||
if(frame != nsnull)
|
||||
{
|
||||
|
||||
@ -320,12 +320,16 @@ if (NS_SUCCEEDED(rv)) {
|
||||
return rv;
|
||||
|
||||
// 2. get the plugin instance corresponding to this element.
|
||||
nsIPresShell* shell = mInner.mDocument->GetShellAt(0);
|
||||
if (nsnull == shell)
|
||||
return NS_ERROR_FAILURE;
|
||||
nsIFrame* frame = nsnull;
|
||||
shell->GetPrimaryFrameFor(mInner.mContent, &frame);
|
||||
NS_RELEASE(shell);
|
||||
nsIPresShell* shell = nsnull;
|
||||
if (mInner.mDocument)
|
||||
shell = mInner.mDocument->GetShellAt(0);
|
||||
|
||||
nsIFrame* frame = nsnull;
|
||||
|
||||
if (shell) {
|
||||
shell->GetPrimaryFrameFor(mInner.mContent, &frame);
|
||||
NS_RELEASE(shell);
|
||||
}
|
||||
|
||||
if(frame != nsnull)
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user