Bug 1725572 - Wait for parent ack when discarding BC from child, r=kmag
I am not confident that this will fix the underlying issue causing this crash, but given how small of a change it is, I figure it's worth trying to land quickly to see if the crash rate drops with it. Differential Revision: https://phabricator.services.mozilla.com/D124503
This commit is contained in:
@@ -859,7 +859,10 @@ void BrowsingContext::Detach(bool aFromIPC) {
|
||||
}
|
||||
});
|
||||
} else if (!aFromIPC) {
|
||||
auto callback = [](auto) {};
|
||||
// Hold a strong reference to ourself until the responses come back to
|
||||
// ensure the BrowsingContext isn't cleaned up before the parent process
|
||||
// acknowledges the discard request.
|
||||
auto callback = [self = RefPtr{this}](auto) {};
|
||||
ContentChild::GetSingleton()->SendDiscardBrowsingContext(this, callback,
|
||||
callback);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user