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

Unified Diff: Source/bindings/templates/interface.cpp

Issue 103963003: IDL compiler: [MeasureAs] interfaces (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 7 years 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
Index: Source/bindings/templates/interface.cpp
diff --git a/Source/bindings/templates/interface.cpp b/Source/bindings/templates/interface.cpp
index b0319b5db3ce240c29ff28e8f91e9303d7d48f86..17d6d655cb2b1877663f0f52adff5319f26eafbb 100644
--- a/Source/bindings/templates/interface.cpp
+++ b/Source/bindings/templates/interface.cpp
@@ -158,6 +158,9 @@ static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info)
void {{v8_class}}::constructorCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "DOMConstructor");
+ {% if measure_as %}
+ UseCounter::count(activeDOMWindow(), UseCounter::{{measure_as}});
+ {% endif %}
if (!info.IsConstructCall()) {
throwTypeError(ExceptionMessages::failedToConstruct("{{interface_name}}", "Please use the 'new' operator, this DOM object constructor cannot be called as a function."), info.GetIsolate());
return;
« no previous file with comments | « Source/bindings/scripts/unstable/v8_interface.py ('k') | Source/bindings/tests/idls/TestInterfaceConstructor.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698