Index: third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp |
diff --git a/third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp b/third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp |
index 774a91e6f608d2efff4e0b965676289fd4b1455b..feb1196c4c3cd6e17c99ba01a3264fb997511055 100644 |
--- a/third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp |
+++ b/third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp |
@@ -377,12 +377,15 @@ void V8Window::namedPropertyGetterCustom( |
if (!hasNamedItem && hasIdItem && |
!doc->containsMultipleElementsWithId(name)) { |
+ UseCounter::count(doc, UseCounter::DOMClobberedVariableAccessed); |
v8SetReturnValueFast(info, doc->getElementById(name), window); |
return; |
} |
HTMLCollection* items = doc->windowNamedItems(name); |
if (!items->isEmpty()) { |
+ UseCounter::count(doc, UseCounter::DOMClobberedVariableAccessed); |
+ |
// TODO(esprehn): Firefox doesn't return an HTMLCollection here if there's |
// multiple with the same name, but Chrome and Safari does. What's the |
// right behavior? |