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

Side by Side Diff: Source/bindings/tests/results/V8TestObject.cpp

Issue 299203002: Support per-overload [RuntimeEnabled] extended attribute (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 7 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 #include "V8TestObject.h" 8 #include "V8TestObject.h"
9 9
10 #include "HTMLNames.h" 10 #include "HTMLNames.h"
(...skipping 8587 matching lines...) Expand 10 before | Expand all | Expand 10 after
8598 impl->perWorldBindingsRuntimeEnabledVoidMethod(); 8598 impl->perWorldBindingsRuntimeEnabledVoidMethod();
8599 } 8599 }
8600 8600
8601 static void perWorldBindingsRuntimeEnabledVoidMethodMethodCallbackForMainWorld(c onst v8::FunctionCallbackInfo<v8::Value>& info) 8601 static void perWorldBindingsRuntimeEnabledVoidMethodMethodCallbackForMainWorld(c onst v8::FunctionCallbackInfo<v8::Value>& info)
8602 { 8602 {
8603 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 8603 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
8604 TestObjectV8Internal::perWorldBindingsRuntimeEnabledVoidMethodMethodForMainW orld(info); 8604 TestObjectV8Internal::perWorldBindingsRuntimeEnabledVoidMethodMethodForMainW orld(info);
8605 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 8605 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
8606 } 8606 }
8607 8607
8608 static void runtimeEnabledOverloadedVoidMethod1Method(const v8::FunctionCallback Info<v8::Value>& info)
8609 {
8610 TestObject* impl = V8TestObject::toNative(info.Holder());
8611 V8StringResource<> stringArg;
8612 {
8613 TOSTRING_VOID_INTERNAL(stringArg, info[0]);
8614 }
8615 impl->runtimeEnabledOverloadedVoidMethod(stringArg);
8616 }
8617
8618 static void runtimeEnabledOverloadedVoidMethod2Method(const v8::FunctionCallback Info<v8::Value>& info)
8619 {
8620 ExceptionState exceptionState(ExceptionState::ExecutionContext, "runtimeEnab ledOverloadedVoidMethod", "TestObject", info.Holder(), info.GetIsolate());
8621 TestObject* impl = V8TestObject::toNative(info.Holder());
8622 int longArg;
8623 {
8624 v8::TryCatch block;
8625 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio nState), exceptionState);
8626 }
8627 impl->runtimeEnabledOverloadedVoidMethod(longArg);
8628 }
8629
8630 static void runtimeEnabledOverloadedVoidMethodMethod(const v8::FunctionCallbackI nfo<v8::Value>& info)
8631 {
8632 v8::Isolate* isolate = info.GetIsolate();
8633 ExceptionState exceptionState(ExceptionState::ExecutionContext, "runtimeEnab ledOverloadedVoidMethod", "TestObject", info.Holder(), isolate);
8634 switch (std::min(1, info.Length())) {
8635 case 1:
8636 if (info[0]->IsNumber()) {
8637 runtimeEnabledOverloadedVoidMethod2Method(info);
8638 return;
8639 }
8640 if (true) {
8641 runtimeEnabledOverloadedVoidMethod1Method(info);
8642 return;
8643 }
8644 break;
8645 default:
8646 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
8647 exceptionState.throwIfNeeded();
8648 return;
8649 }
8650 exceptionState.throwTypeError("No function was found that matched the signat ure provided.");
8651 exceptionState.throwIfNeeded();
8652 }
8653
8654 static void runtimeEnabledOverloadedVoidMethodMethodCallback(const v8::FunctionC allbackInfo<v8::Value>& info)
8655 {
8656 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
8657 TestObjectV8Internal::runtimeEnabledOverloadedVoidMethodMethod(info);
8658 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
8659 }
8660
8661 static void partiallyRuntimeEnabledOverloadedVoidMethod1Method(const v8::Functio nCallbackInfo<v8::Value>& info)
8662 {
8663 TestObject* impl = V8TestObject::toNative(info.Holder());
8664 V8StringResource<> stringArg;
8665 {
8666 TOSTRING_VOID_INTERNAL(stringArg, info[0]);
8667 }
8668 impl->partiallyRuntimeEnabledOverloadedVoidMethod(stringArg);
8669 }
8670
8671 static void partiallyRuntimeEnabledOverloadedVoidMethod2Method(const v8::Functio nCallbackInfo<v8::Value>& info)
8672 {
8673 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partiallyRu ntimeEnabledOverloadedVoidMethod", "TestObject", info.Holder(), info.GetIsolate( ));
8674 TestObject* impl = V8TestObject::toNative(info.Holder());
8675 int longArg;
8676 {
8677 v8::TryCatch block;
8678 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio nState), exceptionState);
8679 }
8680 impl->partiallyRuntimeEnabledOverloadedVoidMethod(longArg);
8681 }
8682
8683 static void partiallyRuntimeEnabledOverloadedVoidMethodMethod(const v8::Function CallbackInfo<v8::Value>& info)
8684 {
8685 v8::Isolate* isolate = info.GetIsolate();
8686 ExceptionState exceptionState(ExceptionState::ExecutionContext, "partiallyRu ntimeEnabledOverloadedVoidMethod", "TestObject", info.Holder(), isolate);
8687 switch (std::min(1, info.Length())) {
8688 case 1:
8689 if (info[0]->IsNumber()) {
8690 partiallyRuntimeEnabledOverloadedVoidMethod2Method(info);
8691 return;
8692 }
8693 if (RuntimeEnabledFeatures::featureNameEnabled()) {
8694 if (true) {
8695 partiallyRuntimeEnabledOverloadedVoidMethod1Method(info);
8696 return;
8697 }
8698 }
8699 if (true) {
8700 partiallyRuntimeEnabledOverloadedVoidMethod2Method(info);
8701 return;
8702 }
8703 break;
8704 default:
8705 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
8706 exceptionState.throwIfNeeded();
8707 return;
8708 }
8709 exceptionState.throwTypeError("No function was found that matched the signat ure provided.");
8710 exceptionState.throwIfNeeded();
8711 }
8712
8713 static void partiallyRuntimeEnabledOverloadedVoidMethodMethodCallback(const v8:: FunctionCallbackInfo<v8::Value>& info)
8714 {
8715 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
8716 TestObjectV8Internal::partiallyRuntimeEnabledOverloadedVoidMethodMethod(info );
8717 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
8718 }
8719
8608 static void treatReturnedNullStringAsNullStringMethodMethod(const v8::FunctionCa llbackInfo<v8::Value>& info) 8720 static void treatReturnedNullStringAsNullStringMethodMethod(const v8::FunctionCa llbackInfo<v8::Value>& info)
8609 { 8721 {
8610 TestObject* impl = V8TestObject::toNative(info.Holder()); 8722 TestObject* impl = V8TestObject::toNative(info.Holder());
8611 v8SetReturnValueStringOrNull(info, impl->treatReturnedNullStringAsNullString Method(), info.GetIsolate()); 8723 v8SetReturnValueStringOrNull(info, impl->treatReturnedNullStringAsNullString Method(), info.GetIsolate());
8612 } 8724 }
8613 8725
8614 static void treatReturnedNullStringAsNullStringMethodMethodCallback(const v8::Fu nctionCallbackInfo<v8::Value>& info) 8726 static void treatReturnedNullStringAsNullStringMethodMethodCallback(const v8::Fu nctionCallbackInfo<v8::Value>& info)
8615 { 8727 {
8616 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 8728 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
8617 TestObjectV8Internal::treatReturnedNullStringAsNullStringMethodMethod(info); 8729 TestObjectV8Internal::treatReturnedNullStringAsNullStringMethodMethod(info);
(...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after
9256 prototypeTemplate->Set(v8AtomicString(isolate, "notEnumerableReadOnlyVoidMet hod"), v8::FunctionTemplate::New(isolate, TestObjectV8Internal::notEnumerableRea dOnlyVoidMethodMethodCallback, v8Undefined(), defaultSignature, 0), static_cast< v8::PropertyAttribute>(v8::DontDelete | v8::DontEnum | v8::ReadOnly)); 9368 prototypeTemplate->Set(v8AtomicString(isolate, "notEnumerableReadOnlyVoidMet hod"), v8::FunctionTemplate::New(isolate, TestObjectV8Internal::notEnumerableRea dOnlyVoidMethodMethodCallback, v8Undefined(), defaultSignature, 0), static_cast< v8::PropertyAttribute>(v8::DontDelete | v8::DontEnum | v8::ReadOnly));
9257 if (RuntimeEnabledFeatures::featureNameEnabled()) 9369 if (RuntimeEnabledFeatures::featureNameEnabled())
9258 prototypeTemplate->Set(v8AtomicString(isolate, "runtimeEnabledVoidMethod "), v8::FunctionTemplate::New(isolate, TestObjectV8Internal::runtimeEnabledVoidM ethodMethodCallback, v8Undefined(), defaultSignature, 0)); 9370 prototypeTemplate->Set(v8AtomicString(isolate, "runtimeEnabledVoidMethod "), v8::FunctionTemplate::New(isolate, TestObjectV8Internal::runtimeEnabledVoidM ethodMethodCallback, v8Undefined(), defaultSignature, 0));
9259 if (DOMWrapperWorld::current(isolate).isMainWorld()) { 9371 if (DOMWrapperWorld::current(isolate).isMainWorld()) {
9260 if (RuntimeEnabledFeatures::featureNameEnabled()) 9372 if (RuntimeEnabledFeatures::featureNameEnabled())
9261 prototypeTemplate->Set(v8AtomicString(isolate, "perWorldBindingsRunt imeEnabledVoidMethod"), v8::FunctionTemplate::New(isolate, TestObjectV8Internal: :perWorldBindingsRuntimeEnabledVoidMethodMethodCallbackForMainWorld, v8Undefined (), defaultSignature, 0)); 9373 prototypeTemplate->Set(v8AtomicString(isolate, "perWorldBindingsRunt imeEnabledVoidMethod"), v8::FunctionTemplate::New(isolate, TestObjectV8Internal: :perWorldBindingsRuntimeEnabledVoidMethodMethodCallbackForMainWorld, v8Undefined (), defaultSignature, 0));
9262 } else { 9374 } else {
9263 if (RuntimeEnabledFeatures::featureNameEnabled()) 9375 if (RuntimeEnabledFeatures::featureNameEnabled())
9264 prototypeTemplate->Set(v8AtomicString(isolate, "perWorldBindingsRunt imeEnabledVoidMethod"), v8::FunctionTemplate::New(isolate, TestObjectV8Internal: :perWorldBindingsRuntimeEnabledVoidMethodMethodCallback, v8Undefined(), defaultS ignature, 0)); 9376 prototypeTemplate->Set(v8AtomicString(isolate, "perWorldBindingsRunt imeEnabledVoidMethod"), v8::FunctionTemplate::New(isolate, TestObjectV8Internal: :perWorldBindingsRuntimeEnabledVoidMethodMethodCallback, v8Undefined(), defaultS ignature, 0));
9265 } 9377 }
9378 if (RuntimeEnabledFeatures::featureNameEnabled())
9379 prototypeTemplate->Set(v8AtomicString(isolate, "runtimeEnabledOverloaded VoidMethod"), v8::FunctionTemplate::New(isolate, TestObjectV8Internal::runtimeEn abledOverloadedVoidMethodMethodCallback, v8Undefined(), defaultSignature, 1));
9380 prototypeTemplate->Set(v8AtomicString(isolate, "partiallyRuntimeEnabledOverl oadedVoidMethod"), v8::FunctionTemplate::New(isolate, TestObjectV8Internal::part iallyRuntimeEnabledOverloadedVoidMethodMethodCallback, v8Undefined(), defaultSig nature, 1));
9266 instanceTemplate->Set(v8AtomicString(isolate, "unforgeableVoidMethod"), v8:: FunctionTemplate::New(isolate, TestObjectV8Internal::unforgeableVoidMethodMethod Callback, v8Undefined(), defaultSignature, 0)); 9381 instanceTemplate->Set(v8AtomicString(isolate, "unforgeableVoidMethod"), v8:: FunctionTemplate::New(isolate, TestObjectV8Internal::unforgeableVoidMethodMethod Callback, v8Undefined(), defaultSignature, 0));
9267 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "staticStrin gAttribute"), TestObjectV8Internal::staticStringAttributeAttributeGetterCallback , TestObjectV8Internal::staticStringAttributeAttributeSetterCallback, v8::Extern al::New(isolate, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Handle<v8 ::AccessorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT)); 9382 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "staticStrin gAttribute"), TestObjectV8Internal::staticStringAttributeAttributeGetterCallback , TestObjectV8Internal::staticStringAttributeAttributeSetterCallback, v8::Extern al::New(isolate, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Handle<v8 ::AccessorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT));
9268 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "staticLongA ttribute"), TestObjectV8Internal::staticLongAttributeAttributeGetterCallback, Te stObjectV8Internal::staticLongAttributeAttributeSetterCallback, v8::External::Ne w(isolate, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Handle<v8::Acce ssorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT)); 9383 functionTemplate->SetNativeDataProperty(v8AtomicString(isolate, "staticLongA ttribute"), TestObjectV8Internal::staticLongAttributeAttributeGetterCallback, Te stObjectV8Internal::staticLongAttributeAttributeSetterCallback, v8::External::Ne w(isolate, 0), static_cast<v8::PropertyAttribute>(v8::None), v8::Handle<v8::Acce ssorSignature>(), static_cast<v8::AccessControl>(v8::DEFAULT));
9269 9384
9270 // Custom toString template 9385 // Custom toString template
9271 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData: :from(isolate)->toStringTemplate()); 9386 functionTemplate->Set(v8AtomicString(isolate, "toString"), V8PerIsolateData: :from(isolate)->toStringTemplate());
9272 } 9387 }
9273 9388
9274 v8::Handle<v8::FunctionTemplate> V8TestObject::domTemplate(v8::Isolate* isolate) 9389 v8::Handle<v8::FunctionTemplate> V8TestObject::domTemplate(v8::Isolate* isolate)
9275 { 9390 {
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
9349 fromInternalPointer(object)->deref(); 9464 fromInternalPointer(object)->deref();
9350 } 9465 }
9351 9466
9352 template<> 9467 template<>
9353 v8::Handle<v8::Value> toV8NoInline(TestObject* impl, v8::Handle<v8::Object> crea tionContext, v8::Isolate* isolate) 9468 v8::Handle<v8::Value> toV8NoInline(TestObject* impl, v8::Handle<v8::Object> crea tionContext, v8::Isolate* isolate)
9354 { 9469 {
9355 return toV8(impl, creationContext, isolate); 9470 return toV8(impl, creationContext, isolate);
9356 } 9471 }
9357 9472
9358 } // namespace WebCore 9473 } // namespace WebCore
OLDNEW
« Source/bindings/scripts/v8_interface.py ('K') | « Source/bindings/tests/idls/TestObject.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698