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 "V8TestTypedefs.h" | 8 #include "V8TestTypedefs.h" |
9 | 9 |
10 #include "bindings/core/v8/ExceptionState.h" | 10 #include "bindings/core/v8/ExceptionState.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 | 29 |
30 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestTypedefs
.h. | 30 // This static member must be declared by DEFINE_WRAPPERTYPEINFO in TestTypedefs
.h. |
31 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in | 31 // For details, see the comment of DEFINE_WRAPPERTYPEINFO in |
32 // bindings/core/v8/ScriptWrappable.h. | 32 // bindings/core/v8/ScriptWrappable.h. |
33 const WrapperTypeInfo& TestTypedefs::s_wrapperTypeInfo = V8TestTypedefs::wrapper
TypeInfo; | 33 const WrapperTypeInfo& TestTypedefs::s_wrapperTypeInfo = V8TestTypedefs::wrapper
TypeInfo; |
34 | 34 |
35 namespace TestTypedefsV8Internal { | 35 namespace TestTypedefsV8Internal { |
36 | 36 |
37 static void uLongLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8:
:Value>& info) | 37 static void uLongLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8:
:Value>& info) |
38 { | 38 { |
39 v8::Handle<v8::Object> holder = info.Holder(); | 39 v8::Local<v8::Object> holder = info.Holder(); |
40 TestTypedefs* impl = V8TestTypedefs::toImpl(holder); | 40 TestTypedefs* impl = V8TestTypedefs::toImpl(holder); |
41 v8SetReturnValue(info, static_cast<double>(impl->uLongLongAttribute())); | 41 v8SetReturnValue(info, static_cast<double>(impl->uLongLongAttribute())); |
42 } | 42 } |
43 | 43 |
44 static void uLongLongAttributeAttributeGetterCallback(v8::Local<v8::String>, con
st v8::PropertyCallbackInfo<v8::Value>& info) | 44 static void uLongLongAttributeAttributeGetterCallback(v8::Local<v8::String>, con
st v8::PropertyCallbackInfo<v8::Value>& info) |
45 { | 45 { |
46 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 46 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
47 TestTypedefsV8Internal::uLongLongAttributeAttributeGetter(info); | 47 TestTypedefsV8Internal::uLongLongAttributeAttributeGetter(info); |
48 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 48 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
49 } | 49 } |
50 | 50 |
51 static void uLongLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, cons
t v8::PropertyCallbackInfo<void>& info) | 51 static void uLongLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, cons
t v8::PropertyCallbackInfo<void>& info) |
52 { | 52 { |
53 v8::Handle<v8::Object> holder = info.Holder(); | 53 v8::Local<v8::Object> holder = info.Holder(); |
54 ExceptionState exceptionState(ExceptionState::SetterContext, "uLongLongAttri
bute", "TestTypedefs", holder, info.GetIsolate()); | 54 ExceptionState exceptionState(ExceptionState::SetterContext, "uLongLongAttri
bute", "TestTypedefs", holder, info.GetIsolate()); |
55 TestTypedefs* impl = V8TestTypedefs::toImpl(holder); | 55 TestTypedefs* impl = V8TestTypedefs::toImpl(holder); |
56 TONATIVE_VOID_EXCEPTIONSTATE(unsigned long long, cppValue, toUInt64(v8Value,
exceptionState), exceptionState); | 56 TONATIVE_VOID_EXCEPTIONSTATE(unsigned long long, cppValue, toUInt64(v8Value,
exceptionState), exceptionState); |
57 impl->setULongLongAttribute(cppValue); | 57 impl->setULongLongAttribute(cppValue); |
58 } | 58 } |
59 | 59 |
60 static void uLongLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8:
:Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 60 static void uLongLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8:
:Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
61 { | 61 { |
62 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 62 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
63 TestTypedefsV8Internal::uLongLongAttributeAttributeSetter(v8Value, info); | 63 TestTypedefsV8Internal::uLongLongAttributeAttributeSetter(v8Value, info); |
64 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 64 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
65 } | 65 } |
66 | 66 |
67 static void TestTypedefsConstructorGetter(v8::Local<v8::String>, const v8::Prope
rtyCallbackInfo<v8::Value>& info) | 67 static void TestTypedefsConstructorGetter(v8::Local<v8::String>, const v8::Prope
rtyCallbackInfo<v8::Value>& info) |
68 { | 68 { |
69 v8::Handle<v8::Value> data = info.Data(); | 69 v8::Local<v8::Value> data = info.Data(); |
70 ASSERT(data->IsExternal()); | 70 ASSERT(data->IsExternal()); |
71 V8PerContextData* perContextData = V8PerContextData::from(info.Holder()->Cre
ationContext()); | 71 V8PerContextData* perContextData = V8PerContextData::from(info.Holder()->Cre
ationContext()); |
72 if (!perContextData) | 72 if (!perContextData) |
73 return; | 73 return; |
74 v8SetReturnValue(info, perContextData->constructorForType(WrapperTypeInfo::u
nwrap(data))); | 74 v8SetReturnValue(info, perContextData->constructorForType(WrapperTypeInfo::u
nwrap(data))); |
75 } | 75 } |
76 | 76 |
77 static void TestTypedefsForceSetAttributeOnThis(v8::Local<v8::String> name, v8::
Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 77 static void TestTypedefsForceSetAttributeOnThis(v8::Local<v8::String> name, v8::
Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
78 { | 78 { |
79 if (info.This()->IsObject()) | 79 if (info.This()->IsObject()) |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 { | 260 { |
261 if (UNLIKELY(info.Length() < 1)) { | 261 if (UNLIKELY(info.Length() < 1)) { |
262 V8ThrowException::throwException(createMinimumArityTypeErrorForConstruct
or(info.GetIsolate(), "TestTypedefs", 1, info.Length()), info.GetIsolate()); | 262 V8ThrowException::throwException(createMinimumArityTypeErrorForConstruct
or(info.GetIsolate(), "TestTypedefs", 1, info.Length()), info.GetIsolate()); |
263 return; | 263 return; |
264 } | 264 } |
265 V8StringResource<> stringArg; | 265 V8StringResource<> stringArg; |
266 { | 266 { |
267 TOSTRING_VOID_INTERNAL(stringArg, info[0]); | 267 TOSTRING_VOID_INTERNAL(stringArg, info[0]); |
268 } | 268 } |
269 RefPtr<TestTypedefs> impl = TestTypedefs::create(stringArg); | 269 RefPtr<TestTypedefs> impl = TestTypedefs::create(stringArg); |
270 v8::Handle<v8::Object> wrapper = info.Holder(); | 270 v8::Local<v8::Object> wrapper = info.Holder(); |
271 impl->associateWithWrapper(info.GetIsolate(), &V8TestTypedefs::wrapperTypeIn
fo, wrapper); | 271 impl->associateWithWrapper(info.GetIsolate(), &V8TestTypedefs::wrapperTypeIn
fo, wrapper); |
272 v8SetReturnValue(info, wrapper); | 272 v8SetReturnValue(info, wrapper); |
273 } | 273 } |
274 | 274 |
275 } // namespace TestTypedefsV8Internal | 275 } // namespace TestTypedefsV8Internal |
276 | 276 |
277 static const V8DOMConfiguration::AttributeConfiguration V8TestTypedefsAttributes
[] = { | 277 static const V8DOMConfiguration::AttributeConfiguration V8TestTypedefsAttributes
[] = { |
278 {"uLongLongAttribute", TestTypedefsV8Internal::uLongLongAttributeAttributeGe
tterCallback, TestTypedefsV8Internal::uLongLongAttributeAttributeSetterCallback,
0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyA
ttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration
::OnInstance}, | 278 {"uLongLongAttribute", TestTypedefsV8Internal::uLongLongAttributeAttributeGe
tterCallback, TestTypedefsV8Internal::uLongLongAttributeAttributeSetterCallback,
0, 0, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyA
ttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration
::OnInstance}, |
279 {"tAttribute", TestTypedefsV8Internal::TestTypedefsConstructorGetter, TestTy
pedefsV8Internal::TestTypedefsForceSetAttributeOnThisCallback, 0, 0, const_cast<
WrapperTypeInfo*>(&V8TestInterface::wrapperTypeInfo), static_cast<v8::AccessCont
rol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfig
uration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, | 279 {"tAttribute", TestTypedefsV8Internal::TestTypedefsConstructorGetter, TestTy
pedefsV8Internal::TestTypedefsForceSetAttributeOnThisCallback, 0, 0, const_cast<
WrapperTypeInfo*>(&V8TestInterface::wrapperTypeInfo), static_cast<v8::AccessCont
rol>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfig
uration::ExposedToAllScripts, V8DOMConfiguration::OnInstance}, |
280 }; | 280 }; |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 { | 350 { |
351 scriptWrappable->toImpl<TestTypedefs>()->ref(); | 351 scriptWrappable->toImpl<TestTypedefs>()->ref(); |
352 } | 352 } |
353 | 353 |
354 void V8TestTypedefs::derefObject(ScriptWrappable* scriptWrappable) | 354 void V8TestTypedefs::derefObject(ScriptWrappable* scriptWrappable) |
355 { | 355 { |
356 scriptWrappable->toImpl<TestTypedefs>()->deref(); | 356 scriptWrappable->toImpl<TestTypedefs>()->deref(); |
357 } | 357 } |
358 | 358 |
359 } // namespace blink | 359 } // namespace blink |
OLD | NEW |