Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(288)

Unified Diff: Source/core/frame/LocalDOMWindow.cpp

Issue 686093002: Oilpan: fix build after r184578. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix MSVC non-Oilpan compilation Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/frame/LocalDOMWindow.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/frame/LocalDOMWindow.cpp
diff --git a/Source/core/frame/LocalDOMWindow.cpp b/Source/core/frame/LocalDOMWindow.cpp
index 7f6286bc2d48e6a9a6fd877e2937b2a91ed079e7..49b4499e49c13c678d9234990b740ba32c13130e 100644
--- a/Source/core/frame/LocalDOMWindow.cpp
+++ b/Source/core/frame/LocalDOMWindow.cpp
@@ -117,16 +117,32 @@ using std::max;
namespace blink {
-LocalDOMWindow::WindowFrameObserver::WindowFrameObserver(
- LocalDOMWindow& window, LocalFrame& frame)
+LocalDOMWindow::WindowFrameObserver::WindowFrameObserver(LocalDOMWindow* window, LocalFrame& frame)
: FrameDestructionObserver(&frame)
, m_window(window)
{
}
+PassOwnPtrWillBeRawPtr<LocalDOMWindow::WindowFrameObserver> LocalDOMWindow::WindowFrameObserver::create(LocalDOMWindow* window, LocalFrame& frame)
+{
+ return adoptPtrWillBeNoop(new WindowFrameObserver(window, frame));
+}
+
+#if !ENABLE(OILPAN)
+LocalDOMWindow::WindowFrameObserver::~WindowFrameObserver()
+{
+}
+#endif
+
+void LocalDOMWindow::WindowFrameObserver::trace(Visitor* visitor)
+{
+ visitor->trace(m_window);
+ FrameDestructionObserver::trace(visitor);
+}
+
void LocalDOMWindow::WindowFrameObserver::willDetachFrameHost()
{
- m_window.willDetachFrameHost();
+ m_window->willDetachFrameHost();
}
class PostMessageTimer final : public SuspendableTimer {
@@ -349,7 +365,7 @@ bool LocalDOMWindow::canShowModalDialogNow(const LocalFrame* frame)
}
LocalDOMWindow::LocalDOMWindow(LocalFrame& frame)
- : m_frameObserver(*this, frame)
+ : m_frameObserver(WindowFrameObserver::create(this, frame))
, m_shouldPrintWhenFinishedLoading(false)
#if ENABLE(ASSERT)
, m_hasBeenReset(false)
@@ -1910,6 +1926,7 @@ PassOwnPtr<LifecycleNotifier<LocalDOMWindow> > LocalDOMWindow::createLifecycleNo
void LocalDOMWindow::trace(Visitor* visitor)
{
#if ENABLE(OILPAN)
+ visitor->trace(m_frameObserver);
visitor->trace(m_document);
visitor->trace(m_properties);
visitor->trace(m_screen);
@@ -1932,14 +1949,13 @@ void LocalDOMWindow::trace(Visitor* visitor)
visitor->trace(m_eventQueue);
HeapSupplementable<LocalDOMWindow>::trace(visitor);
#endif
- visitor->trace(m_frameObserver);
DOMWindow::trace(visitor);
LifecycleContext<LocalDOMWindow>::trace(visitor);
}
LocalFrame* LocalDOMWindow::frame() const
{
- return m_frameObserver.frame();
+ return m_frameObserver->frame();
}
v8::Handle<v8::Object> LocalDOMWindow::wrap(v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
« no previous file with comments | « Source/core/frame/LocalDOMWindow.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698