Bug 731040: Fix bug in which we don't properly create an object frame due to over-aggressive fallback. r=jst

This commit is contained in:
Josh Aas 2012-02-28 10:05:06 -05:00
parent bc6fa5cf0d
commit 242d0ae9d0

View File

@ -904,22 +904,25 @@ nsObjectLoadingContent::OnStartRequest(nsIRequest *aRequest,
if (mFinalListener) {
mType = newType;
mSrcStreamLoading = true;
rv = mFinalListener->OnStartRequest(aRequest, aContext);
mSrcStreamLoading = false;
if (NS_FAILED(rv)) {
#ifdef XP_MACOSX
// Shockwave on Mac is special and returns an error here even when it
// handles the content
if (mContentType.EqualsLiteral("application/x-director")) {
rv = NS_OK; // otherwise, the AutoFallback will make us fall back
if (NS_SUCCEEDED(rv)) {
// Plugins need to set up for NPRuntime.
if (mType == eType_Plugin) {
NotifyContentObjectWrapper();
}
} else {
// Plugins don't fall back if there is an error here.
if (mType == eType_Plugin) {
rv = NS_OK; // this is necessary to avoid auto-fallback
return NS_BINDING_ABORTED;
}
#endif
Fallback(false);
} else if (mType == eType_Plugin) {
NotifyContentObjectWrapper();
}
return rv;
}