diff --git a/dom/security/DOMSecurityManager.cpp b/dom/security/DOMSecurityManager.cpp index b01a781bdea8..dcb7f4c4ee88 100644 --- a/dom/security/DOMSecurityManager.cpp +++ b/dom/security/DOMSecurityManager.cpp @@ -121,9 +121,10 @@ nsresult DOMSecurityManager::ParseCSPAndEnforceFrameAncestorCheck( nsCOMPtr loadInfo = aChannel->LoadInfo(); nsContentPolicyType contentType = loadInfo->GetExternalContentPolicyType(); - // frame-ancestor check only makes sense for subdocument loads, if this is - // not a load of such type, there is nothing to do here. - if (contentType != nsIContentPolicy::TYPE_SUBDOCUMENT) { + // frame-ancestor check only makes sense for subdocument and object loads, + // if this is not a load of such type, there is nothing to do here. + if (contentType != nsIContentPolicy::TYPE_SUBDOCUMENT && + contentType != nsIContentPolicy::TYPE_OBJECT) { return NS_OK; }