Bug 1555488 - Part 1: Clear WindowProxy cache when flipping processes, r=peterv,mccr8
This is sorta-part of the work for bug 1510760. Currently if you do a process switch, the window proxy state is completely borked, and a lot of stuff doesn't work. This patch aims to make it so that, while not transplanted correctly, methods generally don't return the wrong WindowProxy object anymore after a process swap. Differential Revision: https://phabricator.services.mozilla.com/D33082
This commit is contained in:
@@ -5072,9 +5072,11 @@ nsDocShell::Destroy() {
|
||||
mSessionHistory = nullptr;
|
||||
}
|
||||
|
||||
// This will be skipped in cases where we want to preserve the browsing
|
||||
// context between loads.
|
||||
if (!mSkipBrowsingContextDetachOnDestroy) {
|
||||
// Either `Detach` our BrowsingContext if this window is closing, or prepare
|
||||
// the BrowsingContext for the switch to continue.
|
||||
if (mSkipBrowsingContextDetachOnDestroy) {
|
||||
mBrowsingContext->PrepareForProcessChange();
|
||||
} else {
|
||||
mBrowsingContext->Detach();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user