Bug 1291437. Don't enter the compartment of a possibly-gray window object in PostMessageEvent::Run. r=smaug

This commit is contained in:
Boris Zbarsky
2016-08-02 13:21:16 -07:00
parent 06d7ecd3ec
commit 03a4035c88

View File

@@ -81,7 +81,7 @@ PostMessageEvent::Run()
MOZ_ASSERT(targetWindow->IsInnerWindow(),
"we ordered an inner window!");
JSAutoCompartment ac(cx, targetWindow->GetWrapperPreserveColor());
JSAutoCompartment ac(cx, targetWindow->GetWrapper());
// Ensure that any origin which might have been provided is the origin of this
// window's document. Note that we do this *now* instead of when postMessage