mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-05 15:28:39 +09:00
Issue #2534 - Part 1: window.postMessage should provide a trusted MessageEvent
This commit is contained in:
parent
22f745761b
commit
fb16b1b4ae
3 changed files with 11 additions and 16 deletions
|
|
@ -32,16 +32,14 @@ PostMessageEvent::PostMessageEvent(nsGlobalWindow* aSource,
|
|||
const nsAString& aCallerOrigin,
|
||||
nsGlobalWindow* aTargetWindow,
|
||||
nsIPrincipal* aProvidedPrincipal,
|
||||
nsIDocument* aSourceDocument,
|
||||
bool aTrustedCaller)
|
||||
: StructuredCloneHolder(CloningSupported, TransferringSupported,
|
||||
StructuredCloneScope::SameProcessSameThread),
|
||||
mSource(aSource),
|
||||
mCallerOrigin(aCallerOrigin),
|
||||
mTargetWindow(aTargetWindow),
|
||||
mProvidedPrincipal(aProvidedPrincipal),
|
||||
mSourceDocument(aSourceDocument),
|
||||
mTrustedCaller(aTrustedCaller)
|
||||
nsIDocument* aSourceDocument)
|
||||
: StructuredCloneHolder(CloningSupported, TransferringSupported,
|
||||
StructuredCloneScope::SameProcessSameThread)
|
||||
, mSource(aSource)
|
||||
, mCallerOrigin(aCallerOrigin)
|
||||
, mTargetWindow(aTargetWindow)
|
||||
, mProvidedPrincipal(aProvidedPrincipal)
|
||||
, mSourceDocument(aSourceDocument)
|
||||
{
|
||||
MOZ_COUNT_CTOR(PostMessageEvent);
|
||||
}
|
||||
|
|
@ -169,7 +167,7 @@ PostMessageEvent::Run()
|
|||
if (shell)
|
||||
presContext = shell->GetPresContext();
|
||||
|
||||
event->SetTrusted(mTrustedCaller);
|
||||
event->SetTrusted(true);
|
||||
WidgetEvent* internalEvent = event->WidgetEventPtr();
|
||||
|
||||
nsEventStatus status = nsEventStatus_eIgnore;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue