Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/LayoutView.cpp |
| diff --git a/third_party/WebKit/Source/core/layout/LayoutView.cpp b/third_party/WebKit/Source/core/layout/LayoutView.cpp |
| index 5ea72b0b474149b6d37b466e1e69c05fd7e99fd4..d74ca5daaf6a50ba4115e63f0e406a9cb4eae20d 100644 |
| --- a/third_party/WebKit/Source/core/layout/LayoutView.cpp |
| +++ b/third_party/WebKit/Source/core/layout/LayoutView.cpp |
| @@ -66,7 +66,13 @@ public: |
| ~HitTestLatencyRecorder() |
| { |
| int duration = static_cast<int>((WTF::monotonicallyIncreasingTime() - m_start) * 1000000); |
| - Platform::current()->histogramCustomCounts(m_allowsChildFrameContent ? "Event.Latency.HitTestRecursive" : "Event.Latency.HitTest", duration, 0, 10000000, 100); |
| + if (m_allowsChildFrameContent) { |
| + static Platform::HistogramCacheSlot histogramCache = 0; |
| + Platform::current()->histogramCustomCounts("Event.Latency.HitTestRecursive", duration, 0, 10000000, 100, &histogramCache); |
|
esprehn
2016/01/29 23:05:40
DEFINE_STATIC_LOCAL(Histogram, hitTestLatency, ("E
|
| + } else { |
| + static Platform::HistogramCacheSlot histogramCache = 0; |
| + Platform::current()->histogramCustomCounts("Event.Latency.HitTest", duration, 0, 10000000, 100, &histogramCache); |
| + } |
| } |
| private: |