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

Unified Diff: Source/core/dom/Document.cpp

Issue 1211753002: Fix traced StyleResolverStats (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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: Source/core/dom/Document.cpp
diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
index 92fb1746ea222ae65d5486031ff7b204df8188d7..f7b5208f88b386426ef22f9d16808790a7eeba36 100644
--- a/Source/core/dom/Document.cpp
+++ b/Source/core/dom/Document.cpp
@@ -1864,10 +1864,14 @@ void Document::updateStyle(StyleRecalcChange change)
ASSERT(inStyleRecalc());
ASSERT(styleResolver() == &resolver);
m_lifecycle.advanceTo(DocumentLifecycle::StyleClean);
- RefPtr<TracedValue> counters = shouldRecordStats ? resolver.stats()->toTracedValue() : nullptr;
- TRACE_EVENT_END2("blink,blink_style", "Document::updateStyle",
- "resolverAccessCount", styleEngine().resolverAccessCount() - initialResolverAccessCount,
- "counters", counters);
+ if (shouldRecordStats) {
+ TRACE_EVENT_END2("blink,blink_style", "Document::updateStyle",
+ "resolverAccessCount", styleEngine().resolverAccessCount() - initialResolverAccessCount,
+ "counters", resolver.stats()->toTracedValue());
+ } else {
+ TRACE_EVENT_END1("blink,blink_style", "Document::updateStyle",
+ "resolverAccessCount", styleEngine().resolverAccessCount() - initialResolverAccessCount);
+ }
}
void Document::notifyLayoutTreeOfSubtreeChanges()
« 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