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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/custom/V8HTMLPlugInElementCustom.cpp

Issue 2721463004: Added use counters for HTML[Embed | Object]Element getter and setter (Closed)
Patch Set: Created 3 years, 9 months 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * Copyright (C) 2014 Opera Software ASA. All rights reserved. 3 * Copyright (C) 2014 Opera Software ASA. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 v8CallBoolean(instance->CreateDataProperty( 102 v8CallBoolean(instance->CreateDataProperty(
103 info.GetIsolate()->GetCurrentContext(), v8Name, value)); 103 info.GetIsolate()->GetCurrentContext(), v8Name, value));
104 v8SetReturnValue(info, value); 104 v8SetReturnValue(info, value);
105 } 105 }
106 106
107 } // namespace 107 } // namespace
108 108
109 void V8HTMLEmbedElement::namedPropertyGetterCustom( 109 void V8HTMLEmbedElement::namedPropertyGetterCustom(
110 const AtomicString& name, 110 const AtomicString& name,
111 const v8::PropertyCallbackInfo<v8::Value>& info) { 111 const v8::PropertyCallbackInfo<v8::Value>& info) {
112 UseCounter::count(currentExecutionContext(info.GetIsolate()),
113 UseCounter::V8HTMLEmbedElement_getter);
foolip 2017/02/28 04:38:22 The V8* counters are all generated. These are cust
112 getScriptableObjectProperty<V8HTMLEmbedElement>(name, info); 114 getScriptableObjectProperty<V8HTMLEmbedElement>(name, info);
113 } 115 }
114 116
115 void V8HTMLObjectElement::namedPropertyGetterCustom( 117 void V8HTMLObjectElement::namedPropertyGetterCustom(
116 const AtomicString& name, 118 const AtomicString& name,
117 const v8::PropertyCallbackInfo<v8::Value>& info) { 119 const v8::PropertyCallbackInfo<v8::Value>& info) {
120 UseCounter::count(currentExecutionContext(info.GetIsolate()),
121 UseCounter::V8HTMLObjectElement_getter);
118 getScriptableObjectProperty<V8HTMLObjectElement>(name, info); 122 getScriptableObjectProperty<V8HTMLObjectElement>(name, info);
119 } 123 }
120 124
121 void V8HTMLEmbedElement::namedPropertySetterCustom( 125 void V8HTMLEmbedElement::namedPropertySetterCustom(
122 const AtomicString& name, 126 const AtomicString& name,
123 v8::Local<v8::Value> value, 127 v8::Local<v8::Value> value,
124 const v8::PropertyCallbackInfo<v8::Value>& info) { 128 const v8::PropertyCallbackInfo<v8::Value>& info) {
129 UseCounter::count(currentExecutionContext(info.GetIsolate()),
130 UseCounter::V8HTMLEmbedElement_setter);
125 setScriptableObjectProperty<V8HTMLEmbedElement>(name, value, info); 131 setScriptableObjectProperty<V8HTMLEmbedElement>(name, value, info);
126 } 132 }
127 133
128 void V8HTMLObjectElement::namedPropertySetterCustom( 134 void V8HTMLObjectElement::namedPropertySetterCustom(
129 const AtomicString& name, 135 const AtomicString& name,
130 v8::Local<v8::Value> value, 136 v8::Local<v8::Value> value,
131 const v8::PropertyCallbackInfo<v8::Value>& info) { 137 const v8::PropertyCallbackInfo<v8::Value>& info) {
138 UseCounter::count(currentExecutionContext(info.GetIsolate()),
139 UseCounter::V8HTMLObjectElement_setter);
132 setScriptableObjectProperty<V8HTMLObjectElement>(name, value, info); 140 setScriptableObjectProperty<V8HTMLObjectElement>(name, value, info);
133 } 141 }
134 142
135 } // namespace blink 143 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/UseCounter.h » ('j') | third_party/WebKit/Source/core/frame/UseCounter.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698