mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 09:15:35 +00:00
Bug 806127 - ThirdPartyUtil should not consider in-process <iframe mozbrowser/mozapp> to be third-party. r=bz
This commit is contained in:
parent
b4107d842d
commit
bbdd00bd81
@ -115,7 +115,9 @@ ThirdPartyUtil::IsThirdPartyWindow(nsIDOMWindow* aWindow,
|
||||
nsCOMPtr<nsIDOMWindow> current = aWindow, parent;
|
||||
nsCOMPtr<nsIURI> parentURI;
|
||||
do {
|
||||
rv = current->GetParent(getter_AddRefs(parent));
|
||||
// We use GetScriptableParent rather than GetParent because we consider
|
||||
// <iframe mozbrowser/mozapp> to be a top-level frame.
|
||||
rv = current->GetScriptableParent(getter_AddRefs(parent));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
if (SameCOMIdentity(parent, current)) {
|
||||
@ -210,7 +212,9 @@ ThirdPartyUtil::IsThirdPartyChannel(nsIChannel* aChannel,
|
||||
ctx->GetAssociatedWindow(getter_AddRefs(ourWin));
|
||||
if (!ourWin) return NS_ERROR_INVALID_ARG;
|
||||
|
||||
ourWin->GetParent(getter_AddRefs(parentWin));
|
||||
// We use GetScriptableParent rather than GetParent because we consider
|
||||
// <iframe mozbrowser/mozapp> to be a top-level frame.
|
||||
ourWin->GetScriptableParent(getter_AddRefs(parentWin));
|
||||
NS_ENSURE_TRUE(parentWin, NS_ERROR_INVALID_ARG);
|
||||
|
||||
// Check whether this is the document channel for this window (representing a
|
||||
|
Loading…
Reference in New Issue
Block a user