mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1031988 - Grab the principal from the object rather than the window when resolving the controller shim. r=bz
This commit is contained in:
parent
dfc928aba7
commit
b4d5c952de
@ -2628,9 +2628,12 @@ nsWindowSH::GlobalResolve(nsGlobalWindow *aWin, JSContext *cx,
|
||||
}
|
||||
|
||||
#ifdef USE_CONTROLLERS_SHIM
|
||||
// Note: We use |obj| rather than |aWin| to get the principal here, because
|
||||
// this is called during Window setup when the Document isn't necessarily
|
||||
// hooked up yet.
|
||||
if (id == XPCJSRuntime::Get()->GetStringID(XPCJSRuntime::IDX_CONTROLLERS) &&
|
||||
!xpc::IsXrayWrapper(obj) &&
|
||||
!nsContentUtils::IsSystemPrincipal(aWin->GetPrincipal()))
|
||||
!nsContentUtils::IsSystemPrincipal(nsContentUtils::ObjectPrincipal(obj)))
|
||||
{
|
||||
if (aWin->GetDoc()) {
|
||||
aWin->GetDoc()->WarnOnceAbout(nsIDocument::eWindow_Controllers);
|
||||
|
Loading…
Reference in New Issue
Block a user