| 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 14 matching lines...) Expand all Loading... |
| 25 #include "bindings/core/v8/V8TestInterface.h" | 25 #include "bindings/core/v8/V8TestInterface.h" |
| 26 #include "bindings/core/v8/V8TestInterfaceEmpty.h" | 26 #include "bindings/core/v8/V8TestInterfaceEmpty.h" |
| 27 #include "bindings/core/v8/V8Window.h" | 27 #include "bindings/core/v8/V8Window.h" |
| 28 #include "bindings/tests/idls/core/TestImplements2.h" | 28 #include "bindings/tests/idls/core/TestImplements2.h" |
| 29 #include "bindings/tests/idls/core/TestImplements3Implementation.h" | 29 #include "bindings/tests/idls/core/TestImplements3Implementation.h" |
| 30 #include "bindings/tests/idls/core/TestPartialInterface.h" | 30 #include "bindings/tests/idls/core/TestPartialInterface.h" |
| 31 #include "bindings/tests/idls/core/TestPartialInterfaceImplementation.h" | 31 #include "bindings/tests/idls/core/TestPartialInterfaceImplementation.h" |
| 32 #include "core/dom/ContextFeatures.h" | 32 #include "core/dom/ContextFeatures.h" |
| 33 #include "core/dom/Document.h" | 33 #include "core/dom/Document.h" |
| 34 #include "core/frame/LocalFrame.h" | 34 #include "core/frame/LocalFrame.h" |
| 35 #include "core/frame/UseCounter.h" |
| 35 #include "platform/RuntimeEnabledFeatures.h" | 36 #include "platform/RuntimeEnabledFeatures.h" |
| 36 #include "platform/ScriptForbiddenScope.h" | 37 #include "platform/ScriptForbiddenScope.h" |
| 37 #include "platform/TraceEvent.h" | 38 #include "platform/TraceEvent.h" |
| 38 #include "wtf/GetPtr.h" | 39 #include "wtf/GetPtr.h" |
| 39 #include "wtf/RefPtr.h" | 40 #include "wtf/RefPtr.h" |
| 40 | 41 |
| 41 namespace blink { | 42 namespace blink { |
| 42 | 43 |
| 43 WrapperTypeInfo V8TestInterface::wrapperTypeInfo = { gin::kEmbedderBlink, V8Test
Interface::domTemplate, V8TestInterface::refObject, V8TestInterface::derefObject
, V8TestInterface::trace, V8TestInterface::toActiveDOMObject, V8TestInterface::v
isitDOMWrapper, V8TestInterface::installConditionallyEnabledMethods, V8TestInter
face::installConditionallyEnabledProperties, &V8TestInterfaceEmpty::wrapperTypeI
nfo, WrapperTypeInfo::WrapperTypeObjectPrototype, WrapperTypeInfo::ObjectClassId
, WrapperTypeInfo::NotInheritFromEventTarget, WrapperTypeInfo::Dependent, Wrappe
rTypeInfo::RefCountedObject }; | 44 WrapperTypeInfo V8TestInterface::wrapperTypeInfo = { gin::kEmbedderBlink, V8Test
Interface::domTemplate, V8TestInterface::refObject, V8TestInterface::derefObject
, V8TestInterface::trace, V8TestInterface::toActiveDOMObject, V8TestInterface::v
isitDOMWrapper, V8TestInterface::installConditionallyEnabledMethods, V8TestInter
face::installConditionallyEnabledProperties, &V8TestInterfaceEmpty::wrapperTypeI
nfo, WrapperTypeInfo::WrapperTypeObjectPrototype, WrapperTypeInfo::ObjectClassId
, WrapperTypeInfo::NotInheritFromEventTarget, WrapperTypeInfo::Dependent, Wrappe
rTypeInfo::RefCountedObject }; |
| 44 | 45 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 70 static void testInterfaceAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) | 71 static void testInterfaceAttributeAttributeGetter(const v8::PropertyCallbackInfo
<v8::Value>& info) |
| 71 { | 72 { |
| 72 v8::Local<v8::Object> holder = info.Holder(); | 73 v8::Local<v8::Object> holder = info.Holder(); |
| 73 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 74 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 74 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceAttribute()), impl
); | 75 v8SetReturnValueFast(info, WTF::getPtr(impl->testInterfaceAttribute()), impl
); |
| 75 } | 76 } |
| 76 | 77 |
| 77 static void testInterfaceAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) | 78 static void testInterfaceAttributeAttributeGetterCallback(v8::Local<v8::String>,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 78 { | 79 { |
| 79 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 80 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 81 UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionConte
xt(info.GetIsolate()), UseCounter::V8TestInterface_TestInterfaceAttribute_Attrib
uteGetter); |
| 80 TestInterfaceImplementationV8Internal::testInterfaceAttributeAttributeGetter
(info); | 82 TestInterfaceImplementationV8Internal::testInterfaceAttributeAttributeGetter
(info); |
| 81 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 83 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 82 } | 84 } |
| 83 | 85 |
| 84 static void testInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) | 86 static void testInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
| 85 { | 87 { |
| 86 v8::Local<v8::Object> holder = info.Holder(); | 88 v8::Local<v8::Object> holder = info.Holder(); |
| 87 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceA
ttribute", "TestInterface", holder, info.GetIsolate()); | 89 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceA
ttribute", "TestInterface", holder, info.GetIsolate()); |
| 88 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 90 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 89 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck
(info.GetIsolate(), v8Value); | 91 TestInterfaceImplementation* cppValue = V8TestInterface::toImplWithTypeCheck
(info.GetIsolate(), v8Value); |
| 90 if (!cppValue) { | 92 if (!cppValue) { |
| 91 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terface'."); | 93 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terface'."); |
| 92 exceptionState.throwIfNeeded(); | 94 exceptionState.throwIfNeeded(); |
| 93 return; | 95 return; |
| 94 } | 96 } |
| 95 impl->setTestInterfaceAttribute(WTF::getPtr(cppValue)); | 97 impl->setTestInterfaceAttribute(WTF::getPtr(cppValue)); |
| 96 } | 98 } |
| 97 | 99 |
| 98 static void testInterfaceAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 100 static void testInterfaceAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 99 { | 101 { |
| 100 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 102 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 103 UseCounter::countIfNotPrivateScript(info.GetIsolate(), callingExecutionConte
xt(info.GetIsolate()), UseCounter::V8TestInterface_TestInterfaceAttribute_Attrib
uteSetter); |
| 101 TestInterfaceImplementationV8Internal::testInterfaceAttributeAttributeSetter
(v8Value, info); | 104 TestInterfaceImplementationV8Internal::testInterfaceAttributeAttributeSetter
(v8Value, info); |
| 102 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 105 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 103 } | 106 } |
| 104 | 107 |
| 105 static void doubleAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Va
lue>& info) | 108 static void doubleAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Va
lue>& info) |
| 106 { | 109 { |
| 107 v8::Local<v8::Object> holder = info.Holder(); | 110 v8::Local<v8::Object> holder = info.Holder(); |
| 108 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); | 111 TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); |
| 109 v8SetReturnValue(info, impl->doubleAttribute()); | 112 v8SetReturnValue(info, impl->doubleAttribute()); |
| 110 } | 113 } |
| (...skipping 2365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2476 void V8TestInterface::registerPartial2VoidMethodMethodForPartialInterface(void (
*method)(const v8::FunctionCallbackInfo<v8::Value>&)) | 2479 void V8TestInterface::registerPartial2VoidMethodMethodForPartialInterface(void (
*method)(const v8::FunctionCallbackInfo<v8::Value>&)) |
| 2477 { | 2480 { |
| 2478 TestInterfaceImplementationV8Internal::partial2VoidMethodMethodForPartialInt
erface = method; | 2481 TestInterfaceImplementationV8Internal::partial2VoidMethodMethodForPartialInt
erface = method; |
| 2479 } | 2482 } |
| 2480 void V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface(
void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) | 2483 void V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface(
void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) |
| 2481 { | 2484 { |
| 2482 TestInterfaceImplementationV8Internal::partial2StaticVoidMethodMethodForPart
ialInterface = method; | 2485 TestInterfaceImplementationV8Internal::partial2StaticVoidMethodMethodForPart
ialInterface = method; |
| 2483 } | 2486 } |
| 2484 } // namespace blink | 2487 } // namespace blink |
| 2485 #endif // ENABLE(CONDITION) | 2488 #endif // ENABLE(CONDITION) |
| OLD | NEW |