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

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

Issue 2390513002: Fix potential crashes in setHasHorizontal/VerticalScrollbar. (Closed)
Patch Set: Created 4 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 | « 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 44f06f71c39688b9e294c312eb2d608559822fb4..fbfa181763739c9fa617b70a60f6cb6c475ef411 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -3387,8 +3387,7 @@ void FrameView::addChild(Widget* child) {
}
void FrameView::setHasHorizontalScrollbar(bool hasBar) {
- DCHECK(m_frame->settings());
- if (m_frame->settings()->hideScrollbars())
+ if (m_frame->settings() && m_frame->settings()->hideScrollbars())
hasBar = false;
if (hasBar == !!m_horizontalScrollbar)
@@ -3414,8 +3413,7 @@ void FrameView::setHasHorizontalScrollbar(bool hasBar) {
}
void FrameView::setHasVerticalScrollbar(bool hasBar) {
- DCHECK(m_frame->settings());
- if (m_frame->settings()->hideScrollbars())
+ if (m_frame->settings() && m_frame->settings()->hideScrollbars())
hasBar = false;
if (hasBar == !!m_verticalScrollbar)
« 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