| Index: Source/core/frame/LocalFrame.cpp
|
| diff --git a/Source/core/frame/LocalFrame.cpp b/Source/core/frame/LocalFrame.cpp
|
| index ab088f9515fbb1b458b1ea8354492de93743d3d7..09e5bda9a8322fe3a6d9ed1d5e5a51fc90aecc50 100644
|
| --- a/Source/core/frame/LocalFrame.cpp
|
| +++ b/Source/core/frame/LocalFrame.cpp
|
| @@ -204,10 +204,19 @@
|
| // Verify that the FrameView has been cleared as part of detaching
|
| // the frame owner.
|
| ASSERT(!m_view);
|
| +
|
| #if !ENABLE(OILPAN)
|
| // Oilpan: see setDOMWindow() comment why it is acceptable not to
|
| - // explicitly call setDOMWindow() here.
|
| + // mirror the non-Oilpan call below.
|
| + //
|
| + // Also, FrameDestructionObservers that live longer than this
|
| + // frame object keep weak references to the frame; those will be
|
| + // automatically cleared by the garbage collector. Hence, explicit
|
| + // frameDestroyed() notifications aren't needed.
|
| setDOMWindow(nullptr);
|
| +
|
| + for (const auto& frameDestructionObserver : m_destructionObservers)
|
| + frameDestructionObserver->frameDestroyed();
|
| #endif
|
| }
|
|
|
| @@ -272,7 +281,6 @@
|
| m_loader.stopAllLoaders();
|
| if (!client())
|
| return;
|
| -
|
| m_loader.detach();
|
| // Notify ScriptController that the frame is closing, since its cleanup ends up calling
|
| // back to FrameLoaderClient via WindowProxy.
|
| @@ -286,14 +294,6 @@
|
| // finalization. Too late to access various heap objects at that
|
| // stage.
|
| m_loader.clear();
|
| -
|
| - // Signal frame destruction here rather than in the destructor.
|
| - // Main motivation is to avoid being dependent on its exact timing (Oilpan.)
|
| - for (const auto& frameDestructionObserver : m_destructionObservers)
|
| - frameDestructionObserver->frameDestroyed();
|
| -
|
| - m_destructionObservers.clear();
|
| - m_supplements.clear();
|
| }
|
|
|
| SecurityContext* LocalFrame::securityContext() const
|
|
|