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

Side by Side Diff: Source/bindings/tests/results/modules/V8TestInterfacePartial.cpp

Issue 877523004: Add extended attribute, [Measure], to simplify use counting (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 11 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! 5 // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY!
6 6
7 #include "config.h" 7 #include "config.h"
8 #if ENABLE(CONDITION) 8 #if ENABLE(CONDITION)
9 #include "V8TestInterfacePartial.h" 9 #include "V8TestInterfacePartial.h"
10 10
11 #include "bindings/core/v8/ExceptionState.h" 11 #include "bindings/core/v8/ExceptionState.h"
12 #include "bindings/core/v8/PrivateScriptRunner.h" 12 #include "bindings/core/v8/PrivateScriptRunner.h"
13 #include "bindings/core/v8/ScriptPromise.h" 13 #include "bindings/core/v8/ScriptPromise.h"
14 #include "bindings/core/v8/ScriptValue.h" 14 #include "bindings/core/v8/ScriptValue.h"
15 #include "bindings/core/v8/V8DOMConfiguration.h" 15 #include "bindings/core/v8/V8DOMConfiguration.h"
16 #include "bindings/core/v8/V8Document.h" 16 #include "bindings/core/v8/V8Document.h"
17 #include "bindings/core/v8/V8HiddenValue.h" 17 #include "bindings/core/v8/V8HiddenValue.h"
18 #include "bindings/core/v8/V8Node.h" 18 #include "bindings/core/v8/V8Node.h"
19 #include "bindings/core/v8/V8ObjectConstructor.h" 19 #include "bindings/core/v8/V8ObjectConstructor.h"
20 #include "bindings/core/v8/V8TestInterface.h" 20 #include "bindings/core/v8/V8TestInterface.h"
21 #include "bindings/core/v8/V8TestInterfaceEmpty.h" 21 #include "bindings/core/v8/V8TestInterfaceEmpty.h"
22 #include "bindings/core/v8/V8Window.h" 22 #include "bindings/core/v8/V8Window.h"
23 #include "bindings/tests/idls/modules/TestPartialInterfaceImplementation3.h" 23 #include "bindings/tests/idls/modules/TestPartialInterfaceImplementation3.h"
24 #include "core/dom/ContextFeatures.h" 24 #include "core/dom/ContextFeatures.h"
25 #include "core/dom/Document.h" 25 #include "core/dom/Document.h"
26 #include "core/frame/LocalFrame.h" 26 #include "core/frame/LocalFrame.h"
27 #include "core/frame/UseCounter.h"
27 #include "platform/RuntimeEnabledFeatures.h" 28 #include "platform/RuntimeEnabledFeatures.h"
28 #include "platform/ScriptForbiddenScope.h" 29 #include "platform/ScriptForbiddenScope.h"
29 #include "platform/TraceEvent.h" 30 #include "platform/TraceEvent.h"
30 #include "wtf/GetPtr.h" 31 #include "wtf/GetPtr.h"
31 #include "wtf/RefPtr.h" 32 #include "wtf/RefPtr.h"
32 33
33 namespace blink { 34 namespace blink {
34 35
35 namespace TestInterfaceImplementationPartialV8Internal { 36 namespace TestInterfaceImplementationPartialV8Internal {
36 37
37 static void voidMethodPartialOverload3Method(const v8::FunctionCallbackInfo<v8:: Value>& info) 38 static void voidMethodPartialOverload3Method(const v8::FunctionCallbackInfo<v8:: Value>& info)
38 { 39 {
39 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); 40 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
40 V8StringResource<> value; 41 V8StringResource<> value;
41 { 42 {
42 TOSTRING_VOID_INTERNAL(value, info[0]); 43 TOSTRING_VOID_INTERNAL(value, info[0]);
43 } 44 }
44 TestPartialInterfaceImplementation3::voidMethodPartialOverload(*impl, value) ; 45 TestPartialInterfaceImplementation3::voidMethodPartialOverload(*impl, value) ;
45 } 46 }
46 47
47 static void voidMethodPartialOverloadMethod(const v8::FunctionCallbackInfo<v8::V alue>& info) 48 static void voidMethodPartialOverloadMethod(const v8::FunctionCallbackInfo<v8::V alue>& info)
48 { 49 {
49 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodP artialOverload", "TestInterface", info.Holder(), info.GetIsolate()); 50 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodP artialOverload", "TestInterface", info.Holder(), info.GetIsolate());
50 switch (std::min(1, info.Length())) { 51 switch (std::min(1, info.Length())) {
51 case 0: 52 case 0:
52 break; 53 break;
53 case 1: 54 case 1:
54 if (true) { 55 if (true) {
56 UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecut ionContext(info.GetIsolate()), UseCounter::V8TestInterface_VoidMethodPartialOver load_Overload3);
55 voidMethodPartialOverload3Method(info); 57 voidMethodPartialOverload3Method(info);
56 return; 58 return;
57 } 59 }
58 break; 60 break;
59 default: 61 default:
60 break; 62 break;
61 } 63 }
62 exceptionState.throwTypeError("No function was found that matched the signat ure provided."); 64 exceptionState.throwTypeError("No function was found that matched the signat ure provided.");
63 exceptionState.throwIfNeeded(); 65 exceptionState.throwIfNeeded();
64 } 66 }
65 67
66 static void staticVoidMethodPartialOverload2Method(const v8::FunctionCallbackInf o<v8::Value>& info) 68 static void staticVoidMethodPartialOverload2Method(const v8::FunctionCallbackInf o<v8::Value>& info)
67 { 69 {
68 V8StringResource<> value; 70 V8StringResource<> value;
69 { 71 {
70 TOSTRING_VOID_INTERNAL(value, info[0]); 72 TOSTRING_VOID_INTERNAL(value, info[0]);
71 } 73 }
72 TestPartialInterfaceImplementation3::staticVoidMethodPartialOverload(value); 74 TestPartialInterfaceImplementation3::staticVoidMethodPartialOverload(value);
73 } 75 }
74 76
75 static void staticVoidMethodPartialOverloadMethod(const v8::FunctionCallbackInfo <v8::Value>& info) 77 static void staticVoidMethodPartialOverloadMethod(const v8::FunctionCallbackInfo <v8::Value>& info)
76 { 78 {
77 ExceptionState exceptionState(ExceptionState::ExecutionContext, "staticVoidM ethodPartialOverload", "TestInterface", info.Holder(), info.GetIsolate()); 79 ExceptionState exceptionState(ExceptionState::ExecutionContext, "staticVoidM ethodPartialOverload", "TestInterface", info.Holder(), info.GetIsolate());
78 switch (std::min(1, info.Length())) { 80 switch (std::min(1, info.Length())) {
79 case 0: 81 case 0:
80 break; 82 break;
81 case 1: 83 case 1:
82 if (true) { 84 if (true) {
85 UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecut ionContext(info.GetIsolate()), UseCounter::V8TestInterface_StaticVoidMethodParti alOverload_Overload2);
83 staticVoidMethodPartialOverload2Method(info); 86 staticVoidMethodPartialOverload2Method(info);
84 return; 87 return;
85 } 88 }
86 break; 89 break;
87 default: 90 default:
88 break; 91 break;
89 } 92 }
90 exceptionState.throwTypeError("No function was found that matched the signat ure provided."); 93 exceptionState.throwTypeError("No function was found that matched the signat ure provided.");
91 exceptionState.throwIfNeeded(); 94 exceptionState.throwIfNeeded();
92 } 95 }
(...skipping 13 matching lines...) Expand all
106 } 109 }
107 110
108 static void promiseMethodPartialOverloadMethod(const v8::FunctionCallbackInfo<v8 ::Value>& info) 111 static void promiseMethodPartialOverloadMethod(const v8::FunctionCallbackInfo<v8 ::Value>& info)
109 { 112 {
110 ExceptionState exceptionState(ExceptionState::ExecutionContext, "promiseMeth odPartialOverload", "TestInterface", info.Holder(), info.GetIsolate()); 113 ExceptionState exceptionState(ExceptionState::ExecutionContext, "promiseMeth odPartialOverload", "TestInterface", info.Holder(), info.GetIsolate());
111 switch (std::min(1, info.Length())) { 114 switch (std::min(1, info.Length())) {
112 case 0: 115 case 0:
113 break; 116 break;
114 case 1: 117 case 1:
115 if (V8Document::hasInstance(info[0], info.GetIsolate())) { 118 if (V8Document::hasInstance(info[0], info.GetIsolate())) {
119 UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecut ionContext(info.GetIsolate()), UseCounter::V8TestInterface_PromiseMethodPartialO verload_Overload3);
116 promiseMethodPartialOverload3Method(info); 120 promiseMethodPartialOverload3Method(info);
117 return; 121 return;
118 } 122 }
119 break; 123 break;
120 default: 124 default:
121 break; 125 break;
122 } 126 }
123 exceptionState.throwTypeError("No function was found that matched the signat ure provided."); 127 exceptionState.throwTypeError("No function was found that matched the signat ure provided.");
124 v8SetReturnValue(info, exceptionState.reject(ScriptState::current(info.GetIs olate())).v8Value()); 128 v8SetReturnValue(info, exceptionState.reject(ScriptState::current(info.GetIs olate())).v8Value());
125 } 129 }
126 130
127 static void staticPromiseMethodPartialOverload2Method(const v8::FunctionCallback Info<v8::Value>& info) 131 static void staticPromiseMethodPartialOverload2Method(const v8::FunctionCallback Info<v8::Value>& info)
128 { 132 {
129 ExceptionState exceptionState(ExceptionState::ExecutionContext, "staticPromi seMethodPartialOverload", "TestInterface", info.Holder(), info.GetIsolate()); 133 ExceptionState exceptionState(ExceptionState::ExecutionContext, "staticPromi seMethodPartialOverload", "TestInterface", info.Holder(), info.GetIsolate());
130 V8StringResource<> value; 134 V8StringResource<> value;
131 { 135 {
132 TOSTRING_VOID_EXCEPTIONSTATE_PROMISE_INTERNAL(value, info[0], exceptionS tate, info, ScriptState::current(info.GetIsolate())); 136 TOSTRING_VOID_EXCEPTIONSTATE_PROMISE_INTERNAL(value, info[0], exceptionS tate, info, ScriptState::current(info.GetIsolate()));
133 } 137 }
134 v8SetReturnValue(info, TestPartialInterfaceImplementation3::staticPromiseMet hodPartialOverload(value).v8Value()); 138 v8SetReturnValue(info, TestPartialInterfaceImplementation3::staticPromiseMet hodPartialOverload(value).v8Value());
135 } 139 }
136 140
137 static void staticPromiseMethodPartialOverloadMethod(const v8::FunctionCallbackI nfo<v8::Value>& info) 141 static void staticPromiseMethodPartialOverloadMethod(const v8::FunctionCallbackI nfo<v8::Value>& info)
138 { 142 {
139 ExceptionState exceptionState(ExceptionState::ExecutionContext, "staticPromi seMethodPartialOverload", "TestInterface", info.Holder(), info.GetIsolate()); 143 ExceptionState exceptionState(ExceptionState::ExecutionContext, "staticPromi seMethodPartialOverload", "TestInterface", info.Holder(), info.GetIsolate());
140 switch (std::min(1, info.Length())) { 144 switch (std::min(1, info.Length())) {
141 case 0: 145 case 0:
142 break; 146 break;
143 case 1: 147 case 1:
144 if (true) { 148 if (true) {
149 UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecut ionContext(info.GetIsolate()), UseCounter::V8TestInterface_StaticPromiseMethodPa rtialOverload_Overload2);
145 staticPromiseMethodPartialOverload2Method(info); 150 staticPromiseMethodPartialOverload2Method(info);
146 return; 151 return;
147 } 152 }
148 break; 153 break;
149 default: 154 default:
150 break; 155 break;
151 } 156 }
152 exceptionState.throwTypeError("No function was found that matched the signat ure provided."); 157 exceptionState.throwTypeError("No function was found that matched the signat ure provided.");
153 v8SetReturnValue(info, exceptionState.reject(ScriptState::current(info.GetIs olate())).v8Value()); 158 v8SetReturnValue(info, exceptionState.reject(ScriptState::current(info.GetIs olate())).v8Value());
154 } 159 }
(...skipping 23 matching lines...) Expand all
178 } 183 }
179 184
180 static void partial2VoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 185 static void partial2VoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
181 { 186 {
182 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partial2Voi dMethod", "TestInterface", info.Holder(), info.GetIsolate()); 187 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partial2Voi dMethod", "TestInterface", info.Holder(), info.GetIsolate());
183 switch (std::min(1, info.Length())) { 188 switch (std::min(1, info.Length())) {
184 case 0: 189 case 0:
185 break; 190 break;
186 case 1: 191 case 1:
187 if (V8Node::hasInstance(info[0], info.GetIsolate())) { 192 if (V8Node::hasInstance(info[0], info.GetIsolate())) {
193 UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecut ionContext(info.GetIsolate()), UseCounter::V8TestInterface_Partial2VoidMethod_Ov erload3);
188 partial2VoidMethod3Method(info); 194 partial2VoidMethod3Method(info);
189 return; 195 return;
190 } 196 }
191 if (true) { 197 if (true) {
198 UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecut ionContext(info.GetIsolate()), UseCounter::V8TestInterface_Partial2VoidMethod_Ov erload2);
192 partial2VoidMethod2Method(info); 199 partial2VoidMethod2Method(info);
193 return; 200 return;
194 } 201 }
195 break; 202 break;
196 default: 203 default:
197 break; 204 break;
198 } 205 }
199 exceptionState.throwTypeError("No function was found that matched the signat ure provided."); 206 exceptionState.throwTypeError("No function was found that matched the signat ure provided.");
200 exceptionState.throwIfNeeded(); 207 exceptionState.throwIfNeeded();
201 } 208 }
(...skipping 13 matching lines...) Expand all
215 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("partialVoidTestEnumModulesArgMethod", "TestInterface", "para meter 1 ('" + string + "') is not a valid enum value.")); 222 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("partialVoidTestEnumModulesArgMethod", "TestInterface", "para meter 1 ('" + string + "') is not a valid enum value."));
216 return; 223 return;
217 } 224 }
218 } 225 }
219 TestPartialInterfaceImplementation3::partialVoidTestEnumModulesArgMethod(*im pl, arg); 226 TestPartialInterfaceImplementation3::partialVoidTestEnumModulesArgMethod(*im pl, arg);
220 } 227 }
221 228
222 static void partialVoidTestEnumModulesArgMethodMethodCallback(const v8::Function CallbackInfo<v8::Value>& info) 229 static void partialVoidTestEnumModulesArgMethodMethodCallback(const v8::Function CallbackInfo<v8::Value>& info)
223 { 230 {
224 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 231 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
232 UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionConte xt(info.GetIsolate()), UseCounter::V8TestInterface_PartialVoidTestEnumModulesArg Method_Method);
225 TestInterfaceImplementationPartialV8Internal::partialVoidTestEnumModulesArgM ethodMethod(info); 233 TestInterfaceImplementationPartialV8Internal::partialVoidTestEnumModulesArgM ethodMethod(info);
226 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 234 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
227 } 235 }
228 236
229 static void partial2StaticVoidMethod2Method(const v8::FunctionCallbackInfo<v8::V alue>& info) 237 static void partial2StaticVoidMethod2Method(const v8::FunctionCallbackInfo<v8::V alue>& info)
230 { 238 {
231 V8StringResource<> value; 239 V8StringResource<> value;
232 { 240 {
233 TOSTRING_VOID_INTERNAL(value, info[0]); 241 TOSTRING_VOID_INTERNAL(value, info[0]);
234 } 242 }
235 TestPartialInterfaceImplementation3::partial2StaticVoidMethod(value); 243 TestPartialInterfaceImplementation3::partial2StaticVoidMethod(value);
236 } 244 }
237 245
238 static void partial2StaticVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Va lue>& info) 246 static void partial2StaticVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Va lue>& info)
239 { 247 {
240 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partial2Sta ticVoidMethod", "TestInterface", info.Holder(), info.GetIsolate()); 248 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partial2Sta ticVoidMethod", "TestInterface", info.Holder(), info.GetIsolate());
241 switch (std::min(1, info.Length())) { 249 switch (std::min(1, info.Length())) {
242 case 0: 250 case 0:
243 break; 251 break;
244 case 1: 252 case 1:
245 if (true) { 253 if (true) {
254 UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecut ionContext(info.GetIsolate()), UseCounter::V8TestInterface_Partial2StaticVoidMet hod_Overload2);
246 partial2StaticVoidMethod2Method(info); 255 partial2StaticVoidMethod2Method(info);
247 return; 256 return;
248 } 257 }
249 break; 258 break;
250 default: 259 default:
251 break; 260 break;
252 } 261 }
253 exceptionState.throwTypeError("No function was found that matched the signat ure provided."); 262 exceptionState.throwTypeError("No function was found that matched the signat ure provided.");
254 exceptionState.throwIfNeeded(); 263 exceptionState.throwIfNeeded();
255 } 264 }
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 V8TestInterface::registerVoidMethodPartialOverloadMethodForPartialInterface( &TestInterfaceImplementationPartialV8Internal::voidMethodPartialOverloadMethod); 338 V8TestInterface::registerVoidMethodPartialOverloadMethodForPartialInterface( &TestInterfaceImplementationPartialV8Internal::voidMethodPartialOverloadMethod);
330 V8TestInterface::registerStaticVoidMethodPartialOverloadMethodForPartialInte rface(&TestInterfaceImplementationPartialV8Internal::staticVoidMethodPartialOver loadMethod); 339 V8TestInterface::registerStaticVoidMethodPartialOverloadMethodForPartialInte rface(&TestInterfaceImplementationPartialV8Internal::staticVoidMethodPartialOver loadMethod);
331 V8TestInterface::registerPromiseMethodPartialOverloadMethodForPartialInterfa ce(&TestInterfaceImplementationPartialV8Internal::promiseMethodPartialOverloadMe thod); 340 V8TestInterface::registerPromiseMethodPartialOverloadMethodForPartialInterfa ce(&TestInterfaceImplementationPartialV8Internal::promiseMethodPartialOverloadMe thod);
332 V8TestInterface::registerStaticPromiseMethodPartialOverloadMethodForPartialI nterface(&TestInterfaceImplementationPartialV8Internal::staticPromiseMethodParti alOverloadMethod); 341 V8TestInterface::registerStaticPromiseMethodPartialOverloadMethodForPartialI nterface(&TestInterfaceImplementationPartialV8Internal::staticPromiseMethodParti alOverloadMethod);
333 V8TestInterface::registerPartial2VoidMethodMethodForPartialInterface(&TestIn terfaceImplementationPartialV8Internal::partial2VoidMethodMethod); 342 V8TestInterface::registerPartial2VoidMethodMethodForPartialInterface(&TestIn terfaceImplementationPartialV8Internal::partial2VoidMethodMethod);
334 V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface(& TestInterfaceImplementationPartialV8Internal::partial2StaticVoidMethodMethod); 343 V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface(& TestInterfaceImplementationPartialV8Internal::partial2StaticVoidMethodMethod);
335 } 344 }
336 345
337 } // namespace blink 346 } // namespace blink
338 #endif // ENABLE(CONDITION) 347 #endif // ENABLE(CONDITION)
OLDNEW
« Source/bindings/templates/methods.cpp ('K') | « Source/bindings/tests/results/core/V8TestObject.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698