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

Unified Diff: cc/trees/single_thread_proxy.cc

Issue 380763002: Add builders for tracing event's structural arguments (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed memory leak found by Linux ASAN Created 6 years, 5 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 | « cc/trees/single_thread_proxy.h ('k') | cc/trees/thread_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/single_thread_proxy.cc
diff --git a/cc/trees/single_thread_proxy.cc b/cc/trees/single_thread_proxy.cc
index 45dbe8984ada788b408195a2215cc26c82b873bd..2f67740db632d01f2d158708adf00ba2e1c2bff5 100644
--- a/cc/trees/single_thread_proxy.cc
+++ b/cc/trees/single_thread_proxy.cc
@@ -369,18 +369,15 @@ void SingleThreadProxy::CompositeImmediately(base::TimeTicks frame_begin_time) {
}
}
-scoped_ptr<base::Value> SingleThreadProxy::AsValue() const {
- scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue());
- {
- // The following line casts away const modifiers because it is just
- // setting debug state. We still want the AsValue() function and its
- // call chain to be const throughout.
- DebugScopedSetImplThread impl(const_cast<SingleThreadProxy*>(this));
-
- state->Set("layer_tree_host_impl",
- layer_tree_host_impl_->AsValue().release());
- }
- return state.PassAs<base::Value>();
+void SingleThreadProxy::AsValueInto(base::debug::TracedValue* state) const {
+ // The following line casts away const modifiers because it is just
+ // setting debug state. We still want the AsValue() function and its
+ // call chain to be const throughout.
+ DebugScopedSetImplThread impl(const_cast<SingleThreadProxy*>(this));
+
+ state->BeginDictionary("layer_tree_host_impl");
+ layer_tree_host_impl_->AsValueInto(state);
+ state->EndDictionary();
}
void SingleThreadProxy::ForceSerializeOnSwapBuffers() {
« no previous file with comments | « cc/trees/single_thread_proxy.h ('k') | cc/trees/thread_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698