| OLD | NEW |
| 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 "V8TestInterface.h" | 9 #include "V8TestInterface.h" |
| 10 | 10 |
| (...skipping 1094 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1105 TestInterfaceImplementation::windowExposedStaticMethod(); | 1105 TestInterfaceImplementation::windowExposedStaticMethod(); |
| 1106 } | 1106 } |
| 1107 | 1107 |
| 1108 static void windowExposedStaticMethodMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) | 1108 static void windowExposedStaticMethodMethodCallback(const v8::FunctionCallbackIn
fo<v8::Value>& info) |
| 1109 { | 1109 { |
| 1110 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 1110 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 1111 TestInterfaceImplementationV8Internal::windowExposedStaticMethodMethod(info)
; | 1111 TestInterfaceImplementationV8Internal::windowExposedStaticMethodMethod(info)
; |
| 1112 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 1112 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1113 } | 1113 } |
| 1114 | 1114 |
| 1115 static void methodWithExposedAndRuntimeEnabledFlagMethod(const v8::FunctionCallb
ackInfo<v8::Value>& info) |
| 1116 { |
| 1117 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
| 1118 impl->methodWithExposedAndRuntimeEnabledFlag(); |
| 1119 } |
| 1120 |
| 1121 static void methodWithExposedAndRuntimeEnabledFlagMethodCallback(const v8::Funct
ionCallbackInfo<v8::Value>& info) |
| 1122 { |
| 1123 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 1124 TestInterfaceImplementationV8Internal::methodWithExposedAndRuntimeEnabledFla
gMethod(info); |
| 1125 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1126 } |
| 1127 |
| 1128 static void overloadMethodWithExposedAndRuntimeEnabledFlag1Method(const v8::Func
tionCallbackInfo<v8::Value>& info) |
| 1129 { |
| 1130 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadMet
hodWithExposedAndRuntimeEnabledFlag", "TestInterface", info.Holder(), info.GetIs
olate()); |
| 1131 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
| 1132 int longArg; |
| 1133 { |
| 1134 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[0], exceptio
nState), exceptionState); |
| 1135 } |
| 1136 impl->overloadMethodWithExposedAndRuntimeEnabledFlag(longArg); |
| 1137 } |
| 1138 |
| 1139 static void overloadMethodWithExposedAndRuntimeEnabledFlag2Method(const v8::Func
tionCallbackInfo<v8::Value>& info) |
| 1140 { |
| 1141 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
| 1142 V8StringResource<> string; |
| 1143 { |
| 1144 TOSTRING_VOID_INTERNAL(string, info[0]); |
| 1145 } |
| 1146 impl->overloadMethodWithExposedAndRuntimeEnabledFlag(string); |
| 1147 } |
| 1148 |
| 1149 static void overloadMethodWithExposedAndRuntimeEnabledFlag3Method(const v8::Func
tionCallbackInfo<v8::Value>& info) |
| 1150 { |
| 1151 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
| 1152 DOMWindow* window; |
| 1153 { |
| 1154 if (info.Length() > 0 && !V8Window::hasInstance(info[0], info.GetIsolate
())) { |
| 1155 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage
s::failedToExecute("overloadMethodWithExposedAndRuntimeEnabledFlag", "TestInterf
ace", "parameter 1 is not of type 'Window'.")); |
| 1156 return; |
| 1157 } |
| 1158 window = toDOMWindow(info.GetIsolate(), info[0]); |
| 1159 } |
| 1160 impl->overloadMethodWithExposedAndRuntimeEnabledFlag(window); |
| 1161 } |
| 1162 |
| 1163 static void overloadMethodWithExposedAndRuntimeEnabledFlagMethod(const v8::Funct
ionCallbackInfo<v8::Value>& info) |
| 1164 { |
| 1165 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadMet
hodWithExposedAndRuntimeEnabledFlag", "TestInterface", info.Holder(), info.GetIs
olate()); |
| 1166 switch (std::min(1, info.Length())) { |
| 1167 case 1: |
| 1168 if (RuntimeEnabledFeatures::featureName2Enabled()) { |
| 1169 if (V8Window::hasInstance(info[0], info.GetIsolate())) { |
| 1170 overloadMethodWithExposedAndRuntimeEnabledFlag3Method(info); |
| 1171 return; |
| 1172 } |
| 1173 } |
| 1174 if (info[0]->IsNumber()) { |
| 1175 overloadMethodWithExposedAndRuntimeEnabledFlag1Method(info); |
| 1176 return; |
| 1177 } |
| 1178 if (RuntimeEnabledFeatures::featureNameEnabled()) { |
| 1179 if (true) { |
| 1180 overloadMethodWithExposedAndRuntimeEnabledFlag2Method(info); |
| 1181 return; |
| 1182 } |
| 1183 } |
| 1184 if (true) { |
| 1185 overloadMethodWithExposedAndRuntimeEnabledFlag1Method(info); |
| 1186 return; |
| 1187 } |
| 1188 break; |
| 1189 default: |
| 1190 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i
nfo.Length())); |
| 1191 exceptionState.throwIfNeeded(); |
| 1192 return; |
| 1193 } |
| 1194 exceptionState.throwTypeError("No function was found that matched the signat
ure provided."); |
| 1195 exceptionState.throwIfNeeded(); |
| 1196 } |
| 1197 |
| 1198 static void overloadMethodWithExposedAndRuntimeEnabledFlagMethodCallback(const v
8::FunctionCallbackInfo<v8::Value>& info) |
| 1199 { |
| 1200 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 1201 TestInterfaceImplementationV8Internal::overloadMethodWithExposedAndRuntimeEn
abledFlagMethod(info); |
| 1202 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 1203 } |
| 1204 |
| 1115 static void windowAndServiceWorkerExposedMethodMethod(const v8::FunctionCallback
Info<v8::Value>& info) | 1205 static void windowAndServiceWorkerExposedMethodMethod(const v8::FunctionCallback
Info<v8::Value>& info) |
| 1116 { | 1206 { |
| 1117 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); | 1207 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); |
| 1118 impl->windowAndServiceWorkerExposedMethod(); | 1208 impl->windowAndServiceWorkerExposedMethod(); |
| 1119 } | 1209 } |
| 1120 | 1210 |
| 1121 static void windowAndServiceWorkerExposedMethodMethodCallback(const v8::Function
CallbackInfo<v8::Value>& info) | 1211 static void windowAndServiceWorkerExposedMethodMethodCallback(const v8::Function
CallbackInfo<v8::Value>& info) |
| 1122 { | 1212 { |
| 1123 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 1213 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 1124 TestInterfaceImplementationV8Internal::windowAndServiceWorkerExposedMethodMe
thod(info); | 1214 TestInterfaceImplementationV8Internal::windowAndServiceWorkerExposedMethodMe
thod(info); |
| (...skipping 925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2050 } | 2140 } |
| 2051 if (context && (context->isDocument())) { | 2141 if (context && (context->isDocument())) { |
| 2052 prototypeObject->Set(v8AtomicString(isolate, "windowExposedMethod"), v8:
:FunctionTemplate::New(isolate, TestInterfaceImplementationV8Internal::windowExp
osedMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFunction()); | 2142 prototypeObject->Set(v8AtomicString(isolate, "windowExposedMethod"), v8:
:FunctionTemplate::New(isolate, TestInterfaceImplementationV8Internal::windowExp
osedMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFunction()); |
| 2053 } | 2143 } |
| 2054 if (context && (context->isWorkerGlobalScope())) { | 2144 if (context && (context->isWorkerGlobalScope())) { |
| 2055 prototypeObject->Set(v8AtomicString(isolate, "workerExposedStaticMethod"
), v8::FunctionTemplate::New(isolate, TestInterfaceImplementationV8Internal::wor
kerExposedStaticMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFu
nction()); | 2145 prototypeObject->Set(v8AtomicString(isolate, "workerExposedStaticMethod"
), v8::FunctionTemplate::New(isolate, TestInterfaceImplementationV8Internal::wor
kerExposedStaticMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFu
nction()); |
| 2056 } | 2146 } |
| 2057 if (context && (context->isDocument())) { | 2147 if (context && (context->isDocument())) { |
| 2058 prototypeObject->Set(v8AtomicString(isolate, "windowExposedStaticMethod"
), v8::FunctionTemplate::New(isolate, TestInterfaceImplementationV8Internal::win
dowExposedStaticMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFu
nction()); | 2148 prototypeObject->Set(v8AtomicString(isolate, "windowExposedStaticMethod"
), v8::FunctionTemplate::New(isolate, TestInterfaceImplementationV8Internal::win
dowExposedStaticMethodMethodCallback, v8Undefined(), defaultSignature, 0)->GetFu
nction()); |
| 2059 } | 2149 } |
| 2150 if (context && (context->isDocument())) { |
| 2151 if (RuntimeEnabledFeatures::featureNameEnabled()) { |
| 2152 prototypeObject->Set(v8AtomicString(isolate, "methodWithExposedAndRu
ntimeEnabledFlag"), v8::FunctionTemplate::New(isolate, TestInterfaceImplementati
onV8Internal::methodWithExposedAndRuntimeEnabledFlagMethodCallback, v8Undefined(
), defaultSignature, 0)->GetFunction()); |
| 2153 } |
| 2154 } |
| 2155 if (context && (context->isDocument())) { |
| 2156 prototypeObject->Set(v8AtomicString(isolate, "overloadMethodWithExposedA
ndRuntimeEnabledFlag"), v8::FunctionTemplate::New(isolate, TestInterfaceImplemen
tationV8Internal::overloadMethodWithExposedAndRuntimeEnabledFlagMethodCallback,
v8Undefined(), defaultSignature, 1)->GetFunction()); |
| 2157 } |
| 2060 if (context && (context->isDocument() || context->isServiceWorkerGlobalScope
())) { | 2158 if (context && (context->isDocument() || context->isServiceWorkerGlobalScope
())) { |
| 2061 prototypeObject->Set(v8AtomicString(isolate, "windowAndServiceWorkerExpo
sedMethod"), v8::FunctionTemplate::New(isolate, TestInterfaceImplementationV8Int
ernal::windowAndServiceWorkerExposedMethodMethodCallback, v8Undefined(), default
Signature, 0)->GetFunction()); | 2159 prototypeObject->Set(v8AtomicString(isolate, "windowAndServiceWorkerExpo
sedMethod"), v8::FunctionTemplate::New(isolate, TestInterfaceImplementationV8Int
ernal::windowAndServiceWorkerExposedMethodMethodCallback, v8Undefined(), default
Signature, 0)->GetFunction()); |
| 2062 } | 2160 } |
| 2063 } | 2161 } |
| 2064 | 2162 |
| 2065 ActiveDOMObject* V8TestInterface::toActiveDOMObject(v8::Handle<v8::Object> wrapp
er) | 2163 ActiveDOMObject* V8TestInterface::toActiveDOMObject(v8::Handle<v8::Object> wrapp
er) |
| 2066 { | 2164 { |
| 2067 return toImpl(wrapper); | 2165 return toImpl(wrapper); |
| 2068 } | 2166 } |
| 2069 | 2167 |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2188 void V8TestInterface::registerPartial2VoidMethodMethodForPartialInterface(void (
*method)(const v8::FunctionCallbackInfo<v8::Value>&)) | 2286 void V8TestInterface::registerPartial2VoidMethodMethodForPartialInterface(void (
*method)(const v8::FunctionCallbackInfo<v8::Value>&)) |
| 2189 { | 2287 { |
| 2190 TestInterfaceImplementationV8Internal::partial2VoidMethodMethodForPartialInt
erface = method; | 2288 TestInterfaceImplementationV8Internal::partial2VoidMethodMethodForPartialInt
erface = method; |
| 2191 } | 2289 } |
| 2192 void V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface(
void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) | 2290 void V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface(
void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) |
| 2193 { | 2291 { |
| 2194 TestInterfaceImplementationV8Internal::partial2StaticVoidMethodMethodForPart
ialInterface = method; | 2292 TestInterfaceImplementationV8Internal::partial2StaticVoidMethodMethodForPart
ialInterface = method; |
| 2195 } | 2293 } |
| 2196 } // namespace blink | 2294 } // namespace blink |
| 2197 #endif // ENABLE(CONDITION) | 2295 #endif // ENABLE(CONDITION) |
| OLD | NEW |