From 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 27 Jun 2017 06:07:23 +0000 Subject: webkitgtk-2.16.5 --- Source/WebCore/page/DOMWindowProperty.cpp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'Source/WebCore/page/DOMWindowProperty.cpp') diff --git a/Source/WebCore/page/DOMWindowProperty.cpp b/Source/WebCore/page/DOMWindowProperty.cpp index 6f109f1ed..55096b64a 100644 --- a/Source/WebCore/page/DOMWindowProperty.cpp +++ b/Source/WebCore/page/DOMWindowProperty.cpp @@ -35,37 +35,37 @@ namespace WebCore { DOMWindowProperty::DOMWindowProperty(Frame* frame) : m_frame(frame) - , m_associatedDOMWindow(0) + , m_associatedDOMWindow(nullptr) { // FIXME: For now it *is* acceptable for a DOMWindowProperty to be created with a null frame. // See fast/dom/navigator-detached-no-crash.html for the recipe. // We should fix that. if (m_frame) { m_associatedDOMWindow = m_frame->document()->domWindow(); - m_associatedDOMWindow->registerProperty(this); + m_associatedDOMWindow->registerProperty(*this); } } DOMWindowProperty::~DOMWindowProperty() { if (m_associatedDOMWindow) - m_associatedDOMWindow->unregisterProperty(this); + m_associatedDOMWindow->unregisterProperty(*this); - m_associatedDOMWindow = 0; - m_frame = 0; + m_associatedDOMWindow = nullptr; + m_frame = nullptr; } -void DOMWindowProperty::disconnectFrameForPageCache() +void DOMWindowProperty::disconnectFrameForDocumentSuspension() { // If this property is being disconnected from its Frame to enter the PageCache, it must have // been created with a Frame in the first place. ASSERT(m_frame); ASSERT(m_associatedDOMWindow); - m_frame = 0; + m_frame = nullptr; } -void DOMWindowProperty::reconnectFrameFromPageCache(Frame* frame) +void DOMWindowProperty::reconnectFrameFromDocumentSuspension(Frame* frame) { // If this property is being reconnected to its Frame to enter the PageCache, it must have // been disconnected from its Frame in the first place and it should still have an associated DOMWindow. @@ -86,9 +86,9 @@ void DOMWindowProperty::willDestroyGlobalObjectInCachedFrame() // DOMWindowProperty lifetime isn't tied directly to the DOMWindow itself so it is important that it unregister // itself from any DOMWindow it is associated with if that DOMWindow is going away. if (m_associatedDOMWindow) - m_associatedDOMWindow->unregisterProperty(this); - m_associatedDOMWindow = 0; - m_frame = 0; + m_associatedDOMWindow->unregisterProperty(*this); + m_associatedDOMWindow = nullptr; + m_frame = nullptr; } void DOMWindowProperty::willDestroyGlobalObjectInFrame() @@ -100,9 +100,9 @@ void DOMWindowProperty::willDestroyGlobalObjectInFrame() // DOMWindowProperty lifetime isn't tied directly to the DOMWindow itself so it is important that it unregister // itself from any DOMWindow it is associated with if that DOMWindow is going away. if (m_associatedDOMWindow) - m_associatedDOMWindow->unregisterProperty(this); - m_associatedDOMWindow = 0; - m_frame = 0; + m_associatedDOMWindow->unregisterProperty(*this); + m_associatedDOMWindow = nullptr; + m_frame = nullptr; } void DOMWindowProperty::willDetachGlobalObjectFromFrame() -- cgit v1.2.1