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

Unified Diff: third_party/WebKit/Source/web/WebRemoteFrameImpl.cpp

Issue 1648113002: Check for the layoutObject before derefencing it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove navigation from test Created 4 years, 11 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
Index: third_party/WebKit/Source/web/WebRemoteFrameImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebRemoteFrameImpl.cpp b/third_party/WebKit/Source/web/WebRemoteFrameImpl.cpp
index 4b3a445a01c05d3f66dd0178fc146da8c41dda6f..cdf397077fc1a1195b6948f291d2a648d0282428 100644
--- a/third_party/WebKit/Source/web/WebRemoteFrameImpl.cpp
+++ b/third_party/WebKit/Source/web/WebRemoteFrameImpl.cpp
@@ -813,7 +813,9 @@ void WebRemoteFrameImpl::didStopLoading()
bool WebRemoteFrameImpl::isIgnoredForHitTest() const
{
HTMLFrameOwnerElement* owner = frame()->deprecatedLocalOwner();
- return owner ? owner->layoutObject()->style()->pointerEvents() == PE_NONE : false;
+ if (!owner || !owner->layoutObject() || !owner->layoutObject()->style())
dcheng 2016/01/29 00:32:53 Just for my understanding: when is LayoutObject::s
dcheng 2016/01/29 00:35:35 OK, per Elliot, there's no need to have a null che
lfg 2016/01/29 01:08:13 Done.
+ return false;
+ return owner->layoutObject()->style()->pointerEvents() == PE_NONE;
}
WebRemoteFrameImpl::WebRemoteFrameImpl(WebTreeScopeType scope, WebRemoteFrameClient* client)

Powered by Google App Engine
This is Rietveld 408576698