mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
Bug 1490257 - Add triggeringPrincipal to missing cpp loads. r=ckerschb
Depends on D10883 Differential Revision: https://phabricator.services.mozilla.com/D10884 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
42bd423a94
commit
65e7432dba
@ -50,6 +50,7 @@ using mozilla::DefaultXDisplay;
|
||||
#include "nsIContentInlines.h"
|
||||
#include "mozilla/MiscEvents.h"
|
||||
#include "mozilla/MouseEvents.h"
|
||||
#include "mozilla/NullPrincipal.h"
|
||||
#include "mozilla/TextEvents.h"
|
||||
#include "mozilla/dom/DragEvent.h"
|
||||
#include "mozilla/dom/Element.h"
|
||||
@ -482,6 +483,8 @@ NS_IMETHODIMP nsPluginInstanceOwner::GetURL(const char *aURL,
|
||||
mozilla::OriginAttributes attrs =
|
||||
BasePrincipal::Cast(content->NodePrincipal())->OriginAttributesRef();
|
||||
triggeringPrincipal = BasePrincipal::CreateCodebasePrincipal(uri, attrs);
|
||||
} else {
|
||||
triggeringPrincipal = NullPrincipal::CreateWithInheritedAttributes(content->NodePrincipal());
|
||||
}
|
||||
|
||||
rv = lh->OnLinkClick(content, uri, unitarget.get(), VoidString(),
|
||||
|
@ -60,6 +60,7 @@
|
||||
#include "nsSandboxFlags.h"
|
||||
#include "nsSimpleEnumerator.h"
|
||||
#include "mozilla/CheckedInt.h"
|
||||
#include "mozilla/NullPrincipal.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "mozilla/dom/Element.h"
|
||||
#include "mozilla/dom/Storage.h"
|
||||
@ -1033,9 +1034,10 @@ nsWindowWatcher::OpenWindowInternal(mozIDOMWindowProxy* aParent,
|
||||
// Note: The check for the current JSContext isn't necessarily sensical.
|
||||
// It's just designed to preserve old semantics during a mass-conversion
|
||||
// patch.
|
||||
// Bug 1498605 verify usages of systemPrincipal here
|
||||
nsCOMPtr<nsIPrincipal> subjectPrincipal =
|
||||
nsContentUtils::GetCurrentJSContext() ? nsContentUtils::SubjectPrincipal() :
|
||||
nullptr;
|
||||
nsContentUtils::GetSystemPrincipal();
|
||||
|
||||
bool isPrivateBrowsingWindow = false;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user