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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 15743022: Fix potential NULL pointer in LayerTreeHostImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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 | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl.cc
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index ff4ccf7e5b9bc526f807e76f1da705c6e52781d8..42258caf1579575daa9163b119699a4389d20b43 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -2206,10 +2206,11 @@ scoped_ptr<base::Value> LayerTreeHostImpl::AsValue() const {
}
scoped_ptr<base::Value> LayerTreeHostImpl::ActivationStateAsValue() const {
- DCHECK(pending_tree_ && tile_manager_);
scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue());
state->Set("lthi", TracedValue::CreateIDRef(this).release());
- state->Set("tile_manager", tile_manager_->BasicStateAsValue().release());
+ state->Set("tile_manager", tile_manager_ ?
danakj 2013/05/23 14:25:54 Other places (AsValue() above this) just don't set
joth 2013/05/23 19:46:17 Done.
+ tile_manager_->BasicStateAsValue().release() :
+ new base::StringValue("NULL"));
return state.PassAs<base::Value>();
}
« no previous file with comments | « no previous file | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698