destruct objects in stack order
This commit is contained in:
parent
fd4a0626c5
commit
aeeb2a259f
1 changed files with 4 additions and 1 deletions
|
@ -121,7 +121,10 @@ int AtomBrowserMainParts::GetExitCode() {
|
||||||
|
|
||||||
void AtomBrowserMainParts::RegisterDestructionCallback(
|
void AtomBrowserMainParts::RegisterDestructionCallback(
|
||||||
base::OnceClosure callback) {
|
base::OnceClosure callback) {
|
||||||
destructors_.insert(destructors_.end(), std::move(callback));
|
// The destructors should be called in reversed order, so dependencies between
|
||||||
|
// JavaScript objects can be correctly resolved.
|
||||||
|
// For example WebContentsView => WebContents => Session.
|
||||||
|
destructors_.insert(destructors_.begin(), std::move(callback));
|
||||||
}
|
}
|
||||||
|
|
||||||
void AtomBrowserMainParts::PreEarlyInitialization() {
|
void AtomBrowserMainParts::PreEarlyInitialization() {
|
||||||
|
|
Loading…
Reference in a new issue