Index: third_party/WebKit/Source/core/html/AutoplayUmaHelper.cpp |
diff --git a/third_party/WebKit/Source/core/html/AutoplayUmaHelper.cpp b/third_party/WebKit/Source/core/html/AutoplayUmaHelper.cpp |
index 4f3887add4e659264c3b878f32ebc3748599f5ff..a8d92a7d18681fc07ddcf3edcdde20d4deff637c 100644 |
--- a/third_party/WebKit/Source/core/html/AutoplayUmaHelper.cpp |
+++ b/third_party/WebKit/Source/core/html/AutoplayUmaHelper.cpp |
@@ -98,7 +98,7 @@ void AutoplayUmaHelper::didMoveToNewDocument(Document& oldDocument) |
if (oldDocument.domWindow()) |
oldDocument.domWindow()->removeEventListener(EventTypeNames::unload, this, false); |
- if (m_element && m_element->document().domWindow()) |
+ if (m_element->document().domWindow()) |
m_element->document().domWindow()->addEventListener(EventTypeNames::unload, this, false); |
} |
@@ -220,7 +220,7 @@ void AutoplayUmaHelper::maybeStopRecordingMutedVideoOffscreenDuration() |
void AutoplayUmaHelper::maybeUnregisterUnloadListener() |
{ |
- if (!shouldListenToUnloadEvent() && m_element && m_element->document().domWindow()) |
+ if (!shouldListenToUnloadEvent() && m_element->document().domWindow()) |
m_element->document().domWindow()->removeEventListener(EventTypeNames::unload, this, false); |
} |