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

Unified Diff: third_party/WebKit/Source/core/inspector/InstanceCounters.cpp

Issue 2393353003: Fix performance issue in InstanceCounters for DOM nodes (Closed)
Patch Set: Created 4 years, 2 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 | « third_party/WebKit/Source/core/inspector/InstanceCounters.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/inspector/InstanceCounters.cpp
diff --git a/third_party/WebKit/Source/core/inspector/InstanceCounters.cpp b/third_party/WebKit/Source/core/inspector/InstanceCounters.cpp
index c5948b98763ac088a1d4ea12c76fa93d1f63709a..0ddab665a698447c34b9babf5d1e583614b6ee56 100644
--- a/third_party/WebKit/Source/core/inspector/InstanceCounters.cpp
+++ b/third_party/WebKit/Source/core/inspector/InstanceCounters.cpp
@@ -34,7 +34,13 @@ namespace blink {
int InstanceCounters::s_counters[CounterTypeLength];
+int InstanceCounters::s_nodeCounter;
haraken 2016/10/06 08:47:10 Add a comment and mention why we want to have a di
hajimehoshi 2016/10/06 09:34:52 Done.
+
int InstanceCounters::counterValue(CounterType type) {
+ if (type == NodeCounter) {
+ DCHECK(isMainThread());
+ return s_nodeCounter;
+ }
return acquireLoad(&s_counters[type]);
}
« no previous file with comments | « third_party/WebKit/Source/core/inspector/InstanceCounters.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698