import changes from rmottola/Arctic-Fox:

- Bug 1129223 - Remove local mozAfterRemotePaint events (a9aec8f51)
- override -> MOZ_OVERRIDE (2de5b532c)
- Bug 1129223 - Introduce new, more efficient mozLayerTreeReady event (9a363c950)
- Bug 963921 - Clients of the JS API should use JS_DefineElement where appropriate (912f064c0)
- Bug 1133746. Allow DOMProxyShadows to communicate to the JIT whether the shadowing is done by the expando object or not. (dbe537f12)
This commit is contained in:
2019-02-25 11:46:05 +08:00
parent 2e31415af7
commit 301eae9eba
37 changed files with 397 additions and 147 deletions
+7 -3
View File
@@ -19,6 +19,13 @@ namespace dom {
static bool
ShouldExposeChildWindow(nsString& aNameBeingResolved, nsIDOMWindow *aChild)
{
nsCOMPtr<nsPIDOMWindow> piWin = do_QueryInterface(aChild);
NS_ENSURE_TRUE(piWin, false);
Element* e = piWin->GetFrameElementInternal();
if (e && e->IsInShadowTree()) {
return false;
}
// If we're same-origin with the child, go ahead and expose it.
nsCOMPtr<nsIScriptObjectPrincipal> sop = do_QueryInterface(aChild);
NS_ENSURE_TRUE(sop, false);
@@ -63,9 +70,6 @@ ShouldExposeChildWindow(nsString& aNameBeingResolved, nsIDOMWindow *aChild)
// allow the child to arbitrarily pollute the parent namespace, and requires
// cross-origin communication only in a limited set of cases that can be
// computed independently by the parent.
nsCOMPtr<nsPIDOMWindow> piWin = do_QueryInterface(aChild);
NS_ENSURE_TRUE(piWin, false);
Element* e = piWin->GetFrameElementInternal();
return e && e->AttrValueIs(kNameSpaceID_None, nsGkAtoms::name,
aNameBeingResolved, eCaseMatters);
}