| 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 #include "V8TestInterfaceConstructor.h" | 8 #include "V8TestInterfaceConstructor.h" |
| 9 | 9 |
| 10 #include "bindings/core/v8/Dictionary.h" | 10 #include "bindings/core/v8/Dictionary.h" |
| 11 #include "bindings/core/v8/ExceptionState.h" | 11 #include "bindings/core/v8/ExceptionState.h" |
| 12 #include "bindings/core/v8/UnionTypesCore.h" | 12 #include "bindings/core/v8/UnionTypesCore.h" |
| 13 #include "bindings/core/v8/V8DOMConfiguration.h" | 13 #include "bindings/core/v8/V8DOMConfiguration.h" |
| 14 #include "bindings/core/v8/V8ObjectConstructor.h" | 14 #include "bindings/core/v8/V8ObjectConstructor.h" |
| 15 #include "bindings/core/v8/V8TestDictionary.h" | 15 #include "bindings/core/v8/V8TestDictionary.h" |
| 16 #include "bindings/core/v8/V8TestInterfaceEmpty.h" | 16 #include "bindings/core/v8/V8TestInterfaceEmpty.h" |
| 17 #include "core/dom/ContextFeatures.h" | 17 #include "core/dom/ContextFeatures.h" |
| 18 #include "core/dom/Document.h" | 18 #include "core/dom/Document.h" |
| 19 #include "core/frame/LocalDOMWindow.h" | 19 #include "core/frame/LocalDOMWindow.h" |
| 20 #include "core/frame/UseCounter.h" | 20 #include "core/frame/UseCounter.h" |
| 21 #include "platform/RuntimeEnabledFeatures.h" | 21 #include "platform/RuntimeEnabledFeatures.h" |
| 22 #include "platform/TraceEvent.h" | 22 #include "platform/TraceEvent.h" |
| 23 #include "wtf/GetPtr.h" | 23 #include "wtf/GetPtr.h" |
| 24 #include "wtf/RefPtr.h" | 24 #include "wtf/RefPtr.h" |
| 25 | 25 |
| 26 namespace blink { | 26 namespace blink { |
| 27 | 27 |
| 28 // Suppress warning: global constructors, because struct WrapperTypeInfo is triv
ial |
| 29 // and does not depend on another global objects. |
| 30 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) |
| 31 #pragma clang diagnostic push |
| 32 #pragma clang diagnostic ignored "-Wglobal-constructors" |
| 33 #endif |
| 28 const WrapperTypeInfo V8TestInterfaceConstructor::wrapperTypeInfo = { gin::kEmbe
dderBlink, V8TestInterfaceConstructor::domTemplate, V8TestInterfaceConstructor::
refObject, V8TestInterfaceConstructor::derefObject, V8TestInterfaceConstructor::
trace, 0, 0, V8TestInterfaceConstructor::preparePrototypeObject, V8TestInterface
Constructor::installConditionallyEnabledProperties, "TestInterfaceConstructor",
0, WrapperTypeInfo::WrapperTypeObjectPrototype, WrapperTypeInfo::ObjectClassId,
WrapperTypeInfo::NotInheritFromEventTarget, WrapperTypeInfo::Independent, Wrappe
rTypeInfo::RefCountedObject }; | 34 const WrapperTypeInfo V8TestInterfaceConstructor::wrapperTypeInfo = { gin::kEmbe
dderBlink, V8TestInterfaceConstructor::domTemplate, V8TestInterfaceConstructor::
refObject, V8TestInterfaceConstructor::derefObject, V8TestInterfaceConstructor::
trace, 0, 0, V8TestInterfaceConstructor::preparePrototypeObject, V8TestInterface
Constructor::installConditionallyEnabledProperties, "TestInterfaceConstructor",
0, WrapperTypeInfo::WrapperTypeObjectPrototype, WrapperTypeInfo::ObjectClassId,
WrapperTypeInfo::NotInheritFromEventTarget, WrapperTypeInfo::Independent, Wrappe
rTypeInfo::RefCountedObject }; |
| 35 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) |
| 36 #pragma clang diagnostic pop |
| 37 #endif |
| 29 | 38 |
| 30 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestInterfac
eConstructor.h. | 39 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestInterfac
eConstructor.h. |
| 31 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in | 40 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in |
| 32 // bindings/core/v8/ScriptWrappable.h. | 41 // bindings/core/v8/ScriptWrappable.h. |
| 33 const WrapperTypeInfo& TestInterfaceConstructor::s_wrapperTypeInfo = V8TestInter
faceConstructor::wrapperTypeInfo; | 42 const WrapperTypeInfo& TestInterfaceConstructor::s_wrapperTypeInfo = V8TestInter
faceConstructor::wrapperTypeInfo; |
| 34 | 43 |
| 35 namespace TestInterfaceConstructorV8Internal { | 44 namespace TestInterfaceConstructorV8Internal { |
| 36 | 45 |
| 37 static void constructor1(const v8::FunctionCallbackInfo<v8::Value>& info) | 46 static void constructor1(const v8::FunctionCallbackInfo<v8::Value>& info) |
| 38 { | 47 { |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(0, i
nfo.Length())); | 243 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(0, i
nfo.Length())); |
| 235 exceptionState.throwIfNeeded(); | 244 exceptionState.throwIfNeeded(); |
| 236 return; | 245 return; |
| 237 } | 246 } |
| 238 exceptionState.throwTypeError("No matching constructor signature."); | 247 exceptionState.throwTypeError("No matching constructor signature."); |
| 239 exceptionState.throwIfNeeded(); | 248 exceptionState.throwIfNeeded(); |
| 240 } | 249 } |
| 241 | 250 |
| 242 } // namespace TestInterfaceConstructorV8Internal | 251 } // namespace TestInterfaceConstructorV8Internal |
| 243 | 252 |
| 253 // Suppress warning: global constructors, because struct WrapperTypeInfo is triv
ial |
| 254 // and does not depend on another global objects. |
| 255 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) |
| 256 #pragma clang diagnostic push |
| 257 #pragma clang diagnostic ignored "-Wglobal-constructors" |
| 258 #endif |
| 244 const WrapperTypeInfo V8TestInterfaceConstructorConstructor::wrapperTypeInfo = {
gin::kEmbedderBlink, V8TestInterfaceConstructorConstructor::domTemplate, V8Test
InterfaceConstructor::refObject, V8TestInterfaceConstructor::derefObject, V8Test
InterfaceConstructor::trace, 0, 0, V8TestInterfaceConstructor::preparePrototypeO
bject, V8TestInterfaceConstructor::installConditionallyEnabledProperties, "TestI
nterfaceConstructor", 0, WrapperTypeInfo::WrapperTypeObjectPrototype, WrapperTyp
eInfo::ObjectClassId, WrapperTypeInfo::NotInheritFromEventTarget, WrapperTypeInf
o::Independent, WrapperTypeInfo::RefCountedObject }; | 259 const WrapperTypeInfo V8TestInterfaceConstructorConstructor::wrapperTypeInfo = {
gin::kEmbedderBlink, V8TestInterfaceConstructorConstructor::domTemplate, V8Test
InterfaceConstructor::refObject, V8TestInterfaceConstructor::derefObject, V8Test
InterfaceConstructor::trace, 0, 0, V8TestInterfaceConstructor::preparePrototypeO
bject, V8TestInterfaceConstructor::installConditionallyEnabledProperties, "TestI
nterfaceConstructor", 0, WrapperTypeInfo::WrapperTypeObjectPrototype, WrapperTyp
eInfo::ObjectClassId, WrapperTypeInfo::NotInheritFromEventTarget, WrapperTypeInf
o::Independent, WrapperTypeInfo::RefCountedObject }; |
| 260 #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) |
| 261 #pragma clang diagnostic pop |
| 262 #endif |
| 245 | 263 |
| 246 static void V8TestInterfaceConstructorConstructorCallback(const v8::FunctionCall
backInfo<v8::Value>& info) | 264 static void V8TestInterfaceConstructorConstructorCallback(const v8::FunctionCall
backInfo<v8::Value>& info) |
| 247 { | 265 { |
| 248 if (!info.IsConstructCall()) { | 266 if (!info.IsConstructCall()) { |
| 249 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::c
onstructorNotCallableAsFunction("Audio")); | 267 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::c
onstructorNotCallableAsFunction("Audio")); |
| 250 return; | 268 return; |
| 251 } | 269 } |
| 252 | 270 |
| 253 if (ConstructorMode::current(info.GetIsolate()) == ConstructorMode::WrapExis
tingObject) { | 271 if (ConstructorMode::current(info.GetIsolate()) == ConstructorMode::WrapExis
tingObject) { |
| 254 v8SetReturnValue(info, info.Holder()); | 272 v8SetReturnValue(info, info.Holder()); |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 { | 394 { |
| 377 scriptWrappable->toImpl<TestInterfaceConstructor>()->ref(); | 395 scriptWrappable->toImpl<TestInterfaceConstructor>()->ref(); |
| 378 } | 396 } |
| 379 | 397 |
| 380 void V8TestInterfaceConstructor::derefObject(ScriptWrappable* scriptWrappable) | 398 void V8TestInterfaceConstructor::derefObject(ScriptWrappable* scriptWrappable) |
| 381 { | 399 { |
| 382 scriptWrappable->toImpl<TestInterfaceConstructor>()->deref(); | 400 scriptWrappable->toImpl<TestInterfaceConstructor>()->deref(); |
| 383 } | 401 } |
| 384 | 402 |
| 385 } // namespace blink | 403 } // namespace blink |
| OLD | NEW |