forked from mirrors/gecko-dev
Bug 1803628, initiate frameloader destroy asynchronously, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D166830
This commit is contained in:
parent
4f996eda52
commit
ee07926a1f
1 changed files with 6 additions and 1 deletions
|
|
@ -73,7 +73,12 @@ SHEntrySharedParentState::~SHEntrySharedParentState() {
|
|||
RefPtr<nsFrameLoader> loader = mFrameLoader;
|
||||
SetFrameLoader(nullptr);
|
||||
if (loader) {
|
||||
loader->AsyncDestroy();
|
||||
if (NS_FAILED(NS_DispatchToCurrentThread(NS_NewRunnableFunction(
|
||||
"SHEntrySharedParentState::~SHEntrySharedParentState",
|
||||
[loader]() -> void { loader->AsyncDestroy(); })))) {
|
||||
// Trigger AsyncDestroy immediately during shutdown.
|
||||
loader->AsyncDestroy();
|
||||
}
|
||||
}
|
||||
|
||||
sIdToSharedState->Remove(mId);
|
||||
|
|
|
|||
Loading…
Reference in a new issue