Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/LayoutObject.cpp |
| diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.cpp b/third_party/WebKit/Source/core/layout/LayoutObject.cpp |
| index b4c72b29f92030527a0baa5bdf0a32ba945ba01a..008f4f03d48a1226ae24d733fbb55a6f2f8078d6 100644 |
| --- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp |
| +++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp |
| @@ -240,6 +240,8 @@ LayoutObject::LayoutObject(Node* node) |
| if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) |
| m_previousPositionFromPaintInvalidationBacking = uninitializedPaintOffset(); |
| InstanceCounters::incrementCounter(InstanceCounters::LayoutObjectCounter); |
| + if (m_node) |
|
chrishtr
2016/08/11 00:43:35
On every LayoutObject creation? That's expensive.
Charlie Harrison
2016/08/11 00:48:57
It's just upping a counter, right? Or are you more
chrishtr
2016/08/11 00:55:46
I guess it's ok...
Isn't it already counted by li
Charlie Harrison
2016/08/11 01:01:37
Good catch. It would be nice to not duplicate this
Kunihiko Sakamoto
2016/08/11 03:50:18
Yeah the instance counters are process global. We
|
| + frameView()->incrementLayoutObjectCount(); |
| } |
| LayoutObject::~LayoutObject() |