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

Unified Diff: webkit/renderer/compositor_bindings/web_layer_impl.cc

Issue 196573035: Do null check when setting ScrollClipLayer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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: webkit/renderer/compositor_bindings/web_layer_impl.cc
diff --git a/webkit/renderer/compositor_bindings/web_layer_impl.cc b/webkit/renderer/compositor_bindings/web_layer_impl.cc
index 5f76315980eb98305a8c5429cce4edaba7c28a89..cd7283c5e53bfba84c6c68a19163ca5911eaa589 100644
--- a/webkit/renderer/compositor_bindings/web_layer_impl.cc
+++ b/webkit/renderer/compositor_bindings/web_layer_impl.cc
@@ -258,6 +258,10 @@ WebSize WebLayerImpl::maxScrollPosition() const {
}
void WebLayerImpl::setScrollClipLayer(WebLayer* clip_layer) {
+ if (!clip_layer) {
+ layer_->SetScrollClipLayerId(Layer::INVALID_ID);
+ return;
+ }
cc::Layer* cc_clip_layer =
clip_layer ? static_cast<WebLayerImpl*>(clip_layer)->layer() : 0;
aelias_OOO_until_Jul13 2014/03/18 23:17:10 Please also get rid of the null check here.
qinmin 2014/03/18 23:20:43 missed it, done On 2014/03/18 23:17:10, aelias wro
layer_->SetScrollClipLayerId(cc_clip_layer->id());
« 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