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

Unified Diff: third_party/WebKit/Source/core/frame/FrameView.cpp

Issue 2521543004: Avoid calling a virtual method on a null document in lifecycle(). (Closed)
Patch Set: Created 4 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/frame/FrameView.cpp
diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp
index 1e1bf54b71d6690470c8e3bd803e423ea33ab088..c380e310f2542f72e4dc790659887ac73905d7fb 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -1366,6 +1366,8 @@ FloatSize FrameView::viewportSizeForViewportUnits() const {
}
DocumentLifecycle& FrameView::lifecycle() const {
+ DCHECK(m_frame);
+ DCHECK(m_frame->document());
return m_frame->document()->lifecycle();
}
@@ -4599,7 +4601,8 @@ void FrameView::maybeRecordLoadReason() {
}
bool FrameView::shouldThrottleRendering() const {
- return canThrottleRendering() && lifecycle().throttlingAllowed();
+ return canThrottleRendering() && m_frame->document() &&
+ lifecycle().throttlingAllowed();
}
bool FrameView::canThrottleRendering() const {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698