Commit 026ac85f authored by Shanmuga Pandi M's avatar Shanmuga Pandi M Committed by Commit Bot

Measure HTMLFrameSetElement's non-null anonymous name getter

This patch measures how often getter returns anything
other than non null.

Bug: 695891
Change-Id: I62ea96d6ccf9c0dea0804dcab221e71b55ffca37
Reviewed-on: https://chromium-review.googlesource.com/773520
Commit-Queue: Shanmuga Pandi <shanmuga.m@samsung.com>
Reviewed-by: default avatarPhilip Jägenstedt <foolip@chromium.org>
Cr-Commit-Position: refs/heads/master@{#517789}
parent 92f66918
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include "core/events/MouseEvent.h" #include "core/events/MouseEvent.h"
#include "core/frame/LocalFrame.h" #include "core/frame/LocalFrame.h"
#include "core/frame/LocalFrameClient.h" #include "core/frame/LocalFrameClient.h"
#include "core/frame/UseCounter.h"
#include "core/html/HTMLCollection.h" #include "core/html/HTMLCollection.h"
#include "core/html/HTMLFrameElement.h" #include "core/html/HTMLFrameElement.h"
#include "core/html_names.h" #include "core/html_names.h"
...@@ -297,7 +298,13 @@ LocalDOMWindow* HTMLFrameSetElement::AnonymousNamedGetter( ...@@ -297,7 +298,13 @@ LocalDOMWindow* HTMLFrameSetElement::AnonymousNamedGetter(
Document* document = ToHTMLFrameElement(frame_element)->contentDocument(); Document* document = ToHTMLFrameElement(frame_element)->contentDocument();
if (!document || !document->GetFrame()) if (!document || !document->GetFrame())
return nullptr; return nullptr;
return document->domWindow();
LocalDOMWindow* window = document->domWindow();
if (window) {
UseCounter::Count(
*document, WebFeature::kHTMLFrameSetElementNonNullAnonymousNamedGetter);
}
return window;
} }
} // namespace blink } // namespace blink
...@@ -1760,6 +1760,7 @@ enum WebFeature { ...@@ -1760,6 +1760,7 @@ enum WebFeature {
kLinkRelModulePreload = 2232, kLinkRelModulePreload = 2232,
kPerformanceMeasurePassedInObject = 2233, kPerformanceMeasurePassedInObject = 2233,
kPerformanceMeasurePassedInNavigationTiming = 2234, kPerformanceMeasurePassedInNavigationTiming = 2234,
kHTMLFrameSetElementNonNullAnonymousNamedGetter = 2235,
// Add new features immediately above this line. Don't change assigned // Add new features immediately above this line. Don't change assigned
// numbers of any item, and don't reuse removed slots. // numbers of any item, and don't reuse removed slots.
......
...@@ -16975,6 +16975,7 @@ Called by update_net_error_codes.py.--> ...@@ -16975,6 +16975,7 @@ Called by update_net_error_codes.py.-->
<int value="2232" label="LinkRelModulePreload"/> <int value="2232" label="LinkRelModulePreload"/>
<int value="2233" label="PerformanceMeasurePassedInObject"/> <int value="2233" label="PerformanceMeasurePassedInObject"/>
<int value="2234" label="PerformanceMeasurePassedInNavigationTiming"/> <int value="2234" label="PerformanceMeasurePassedInNavigationTiming"/>
<int value="2235" label="HTMLFrameSetElementNonNullAnonymousNamedGetter"/>
</enum> </enum>
<enum name="FeedbackSource"> <enum name="FeedbackSource">
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment