mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-18 07:45:30 +00:00
Bug 1450266 P4 Rebind DETH objects to the new global when document.open() is called. r=smaug
This commit is contained in:
parent
852bbba6c0
commit
25d3f442b6
@ -1850,6 +1850,15 @@ nsGlobalWindowOuter::SetNewDocument(nsIDocument* aDocument,
|
||||
currentInner->mPerformance->GetDOMTiming(),
|
||||
currentInner->mPerformance->GetChannel());
|
||||
}
|
||||
|
||||
// Rebind DETH objects to the new global created by document.open().
|
||||
// XXX: Is this correct? We should consider if the spec and our
|
||||
// implementation should change to match other browsers by
|
||||
// just reusing the current window. (Bug 1449992)
|
||||
currentInner->ForEachEventTargetObject(
|
||||
[&] (DOMEventTargetHelper* aDETH, bool* aDoneOut) {
|
||||
aDETH->BindToOwner(newInnerWindow->AsGlobal());
|
||||
});
|
||||
}
|
||||
|
||||
// Don't free objects on our current inner window if it's going to be
|
||||
|
Loading…
Reference in New Issue
Block a user