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

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

Issue 2728683007: Fix crash when de-referencing the WebFrameWidget. (Closed)
Patch Set: Created 3 years, 10 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/web/WebViewImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebViewImpl.cpp b/third_party/WebKit/Source/web/WebViewImpl.cpp
index 9f38cd1d7fae8fb22e39a071554e5ac0b8d570b0..9ab4295f3c4d42406932e3415ad9fb185dfe9155 100644
--- a/third_party/WebKit/Source/web/WebViewImpl.cpp
+++ b/third_party/WebKit/Source/web/WebViewImpl.cpp
@@ -2536,15 +2536,18 @@ void WebViewImpl::willCloseLayerTreeView() {
}
void WebViewImpl::didAcquirePointerLock() {
- mainFrameImpl()->frameWidget()->didAcquirePointerLock();
+ if (mainFrameImpl())
+ mainFrameImpl()->frameWidget()->didAcquirePointerLock();
}
void WebViewImpl::didNotAcquirePointerLock() {
- mainFrameImpl()->frameWidget()->didNotAcquirePointerLock();
+ if (mainFrameImpl())
+ mainFrameImpl()->frameWidget()->didNotAcquirePointerLock();
}
void WebViewImpl::didLosePointerLock() {
- mainFrameImpl()->frameWidget()->didLosePointerLock();
+ if (mainFrameImpl())
dcheng 2017/03/03 23:57:24 Please add some comments here too to document the
lfg 2017/03/06 21:31:01 Done.
+ mainFrameImpl()->frameWidget()->didLosePointerLock();
}
// TODO(ekaramad):This method is almost duplicated in WebFrameWidgetImpl as
« 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