mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
Bug 1258111 - Fix crash in CheckPolicy. r=billm
This commit is contained in:
parent
577b657567
commit
0d99d638ef
@ -160,7 +160,9 @@ nsContentPolicy::CheckPolicy(CPMethod policyMethod,
|
||||
if (window) {
|
||||
nsCOMPtr<nsIDocShell> docShell = window->GetDocShell();
|
||||
nsCOMPtr<nsILoadContext> loadContext = do_QueryInterface(docShell);
|
||||
loadContext->GetTopFrameElement(getter_AddRefs(topFrameElement));
|
||||
if (loadContext) {
|
||||
loadContext->GetTopFrameElement(getter_AddRefs(topFrameElement));
|
||||
}
|
||||
|
||||
MOZ_ASSERT(window->IsOuterWindow());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user