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

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

Issue 831483004: IDL: Make enums have global visibility (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
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
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
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 return; 193 return;
194 } 194 }
195 break; 195 break;
196 default: 196 default:
197 break; 197 break;
198 } 198 }
199 exceptionState.throwTypeError("No function was found that matched the signat ure provided."); 199 exceptionState.throwTypeError("No function was found that matched the signat ure provided.");
200 exceptionState.throwIfNeeded(); 200 exceptionState.throwIfNeeded();
201 } 201 }
202 202
203 static void partialVoidTestEnumModulesArgMethodMethod(const v8::FunctionCallback Info<v8::Value>& info)
204 {
205 if (UNLIKELY(info.Length() < 1)) {
206 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(in fo.GetIsolate(), "partialVoidTestEnumModulesArgMethod", "TestInterface", 1, info .Length()), info.GetIsolate());
207 return;
208 }
209 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
210 V8StringResource<> arg;
211 {
212 TOSTRING_VOID_INTERNAL(arg, info[0]);
213 String string = arg;
214 if (!(string == "EnumModulesValue1" || string == "EnumModulesValue2")) {
215 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("partialVoidTestEnumModulesArgMethod", "TestInterface", "para meter 1 ('" + string + "') is not a valid enum value."));
216 return;
217 }
218 }
219 TestPartialInterfaceImplementation3::partialVoidTestEnumModulesArgMethod(*im pl, arg);
220 }
221
222 static void partialVoidTestEnumModulesArgMethodMethodCallback(const v8::Function CallbackInfo<v8::Value>& info)
223 {
224 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
225 TestInterfaceImplementationPartialV8Internal::partialVoidTestEnumModulesArgM ethodMethod(info);
226 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
227 }
228
203 static void partial2StaticVoidMethod2Method(const v8::FunctionCallbackInfo<v8::V alue>& info) 229 static void partial2StaticVoidMethod2Method(const v8::FunctionCallbackInfo<v8::V alue>& info)
204 { 230 {
205 V8StringResource<> value; 231 V8StringResource<> value;
206 { 232 {
207 TOSTRING_VOID_INTERNAL(value, info[0]); 233 TOSTRING_VOID_INTERNAL(value, info[0]);
208 } 234 }
209 TestPartialInterfaceImplementation3::partial2StaticVoidMethod(value); 235 TestPartialInterfaceImplementation3::partial2StaticVoidMethod(value);
210 } 236 }
211 237
212 static void partial2StaticVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Va lue>& info) 238 static void partial2StaticVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Va lue>& info)
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 static const V8DOMConfiguration::ConstantConfiguration V8TestInterfaceConsta nts[] = { 275 static const V8DOMConfiguration::ConstantConfiguration V8TestInterfaceConsta nts[] = {
250 {"PARTIAL3_UNSIGNED_SHORT", 0, 0, 0, V8DOMConfiguration::ConstantTypeUns ignedShort}, 276 {"PARTIAL3_UNSIGNED_SHORT", 0, 0, 0, V8DOMConfiguration::ConstantTypeUns ignedShort},
251 }; 277 };
252 V8DOMConfiguration::installConstants(isolate, functionTemplate, prototypeTem plate, V8TestInterfaceConstants, WTF_ARRAY_LENGTH(V8TestInterfaceConstants)); 278 V8DOMConfiguration::installConstants(isolate, functionTemplate, prototypeTem plate, V8TestInterfaceConstants, WTF_ARRAY_LENGTH(V8TestInterfaceConstants));
253 functionTemplate->InstanceTemplate()->SetCallAsFunctionHandler(V8TestInterfa ce::legacyCallCustom); 279 functionTemplate->InstanceTemplate()->SetCallAsFunctionHandler(V8TestInterfa ce::legacyCallCustom);
254 } 280 }
255 281
256 void V8TestInterfacePartial::installConditionallyEnabledMethods(v8::Local<v8::Ob ject> prototypeObject, v8::Isolate* isolate) 282 void V8TestInterfacePartial::installConditionallyEnabledMethods(v8::Local<v8::Ob ject> prototypeObject, v8::Isolate* isolate)
257 { 283 {
258 V8TestInterface::installConditionallyEnabledMethods(prototypeObject, isolate ); 284 V8TestInterface::installConditionallyEnabledMethods(prototypeObject, isolate );
285 v8::Local<v8::Signature> defaultSignature = v8::Signature::New(isolate, domT emplate(isolate));
286 ExecutionContext* context = toExecutionContext(prototypeObject->CreationCont ext());
287 ASSERT(context);
288
289 if (context && context->isDocument() && ContextFeatures::partialContextName3 Enabled(toDocument(context))) {
290 prototypeObject->Set(v8AtomicString(isolate, "partialVoidTestEnumModules ArgMethod"), v8::FunctionTemplate::New(isolate, TestInterfaceImplementationParti alV8Internal::partialVoidTestEnumModulesArgMethodMethodCallback, v8Undefined(), defaultSignature, 1)->GetFunction());
291 }
259 } 292 }
260 293
261 bool V8TestInterface::PrivateScript::shortMethodWithShortArgumentImplementedInPr ivateScriptMethod(LocalFrame* frame, TestInterface* holderImpl, int value, int* result) 294 bool V8TestInterface::PrivateScript::shortMethodWithShortArgumentImplementedInPr ivateScriptMethod(LocalFrame* frame, TestInterface* holderImpl, int value, int* result)
262 { 295 {
263 if (!frame) 296 if (!frame)
264 return false; 297 return false;
265 v8::HandleScope handleScope(toIsolate(frame)); 298 v8::HandleScope handleScope(toIsolate(frame));
266 ScriptForbiddenScope::AllowUserAgentScript script; 299 ScriptForbiddenScope::AllowUserAgentScript script;
267 v8::Local<v8::Context> contextInPrivateScript = toV8Context(frame, DOMWrappe rWorld::privateScriptIsolatedWorld()); 300 v8::Local<v8::Context> contextInPrivateScript = toV8Context(frame, DOMWrappe rWorld::privateScriptIsolatedWorld());
268 if (contextInPrivateScript.IsEmpty()) 301 if (contextInPrivateScript.IsEmpty())
(...skipping 27 matching lines...) Expand all
296 V8TestInterface::registerVoidMethodPartialOverloadMethodForPartialInterface( &TestInterfaceImplementationPartialV8Internal::voidMethodPartialOverloadMethod); 329 V8TestInterface::registerVoidMethodPartialOverloadMethodForPartialInterface( &TestInterfaceImplementationPartialV8Internal::voidMethodPartialOverloadMethod);
297 V8TestInterface::registerStaticVoidMethodPartialOverloadMethodForPartialInte rface(&TestInterfaceImplementationPartialV8Internal::staticVoidMethodPartialOver loadMethod); 330 V8TestInterface::registerStaticVoidMethodPartialOverloadMethodForPartialInte rface(&TestInterfaceImplementationPartialV8Internal::staticVoidMethodPartialOver loadMethod);
298 V8TestInterface::registerPromiseMethodPartialOverloadMethodForPartialInterfa ce(&TestInterfaceImplementationPartialV8Internal::promiseMethodPartialOverloadMe thod); 331 V8TestInterface::registerPromiseMethodPartialOverloadMethodForPartialInterfa ce(&TestInterfaceImplementationPartialV8Internal::promiseMethodPartialOverloadMe thod);
299 V8TestInterface::registerStaticPromiseMethodPartialOverloadMethodForPartialI nterface(&TestInterfaceImplementationPartialV8Internal::staticPromiseMethodParti alOverloadMethod); 332 V8TestInterface::registerStaticPromiseMethodPartialOverloadMethodForPartialI nterface(&TestInterfaceImplementationPartialV8Internal::staticPromiseMethodParti alOverloadMethod);
300 V8TestInterface::registerPartial2VoidMethodMethodForPartialInterface(&TestIn terfaceImplementationPartialV8Internal::partial2VoidMethodMethod); 333 V8TestInterface::registerPartial2VoidMethodMethodForPartialInterface(&TestIn terfaceImplementationPartialV8Internal::partial2VoidMethodMethod);
301 V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface(& TestInterfaceImplementationPartialV8Internal::partial2StaticVoidMethodMethod); 334 V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface(& TestInterfaceImplementationPartialV8Internal::partial2StaticVoidMethodMethod);
302 } 335 }
303 336
304 } // namespace blink 337 } // namespace blink
305 #endif // ENABLE(CONDITION) 338 #endif // ENABLE(CONDITION)
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/core/V8TestInterface.cpp ('k') | Source/core/html/canvas/HitRegionOptions.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698