| 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 "V8TestInterfaceNamedConstructor.h" | 8 #include "V8TestInterfaceNamedConstructor.h" |
| 9 | 9 |
| 10 #include "bindings/core/v8/ExceptionState.h" | 10 #include "bindings/core/v8/ExceptionState.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 } | 30 } |
| 31 | 31 |
| 32 } // namespace blink | 32 } // namespace blink |
| 33 | 33 |
| 34 void webCoreInitializeScriptWrappableForInterface(blink::TestInterfaceNamedConst
ructor* object) | 34 void webCoreInitializeScriptWrappableForInterface(blink::TestInterfaceNamedConst
ructor* object) |
| 35 { | 35 { |
| 36 blink::initializeScriptWrappableForInterface(object); | 36 blink::initializeScriptWrappableForInterface(object); |
| 37 } | 37 } |
| 38 | 38 |
| 39 namespace blink { | 39 namespace blink { |
| 40 const WrapperTypeInfo V8TestInterfaceNamedConstructor::wrapperTypeInfo = { gin::
kEmbedderBlink, V8TestInterfaceNamedConstructor::domTemplate, V8TestInterfaceNam
edConstructor::derefObject, V8TestInterfaceNamedConstructor::toActiveDOMObject,
0, 0, V8TestInterfaceNamedConstructor::installConditionallyEnabledMethods, 0, Wr
apperTypeObjectPrototype, RefCountedObject }; | 40 const WrapperTypeInfo V8TestInterfaceNamedConstructor::wrapperTypeInfo = { gin::
kEmbedderBlink, V8TestInterfaceNamedConstructor::domTemplate, V8TestInterfaceNam
edConstructor::derefObject, V8TestInterfaceNamedConstructor::toActiveDOMObject,
0, 0, V8TestInterfaceNamedConstructor::installPerContextEnabledMethods, 0, Wrapp
erTypeObjectPrototype, RefCountedObject }; |
| 41 | 41 |
| 42 namespace TestInterfaceNamedConstructorV8Internal { | 42 namespace TestInterfaceNamedConstructorV8Internal { |
| 43 | 43 |
| 44 template <typename T> void V8_USE(T) { } | 44 template <typename T> void V8_USE(T) { } |
| 45 | 45 |
| 46 static void TestInterfaceNamedConstructorConstructorGetter(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) | 46 static void TestInterfaceNamedConstructorConstructorGetter(v8::Local<v8::String>
, const v8::PropertyCallbackInfo<v8::Value>& info) |
| 47 { | 47 { |
| 48 v8::Handle<v8::Value> data = info.Data(); | 48 v8::Handle<v8::Value> data = info.Data(); |
| 49 ASSERT(data->IsExternal()); | 49 ASSERT(data->IsExternal()); |
| 50 V8PerContextData* perContextData = V8PerContextData::from(info.Holder()->Cre
ationContext()); | 50 V8PerContextData* perContextData = V8PerContextData::from(info.Holder()->Cre
ationContext()); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 63 { | 63 { |
| 64 TestInterfaceNamedConstructorV8Internal::TestInterfaceNamedConstructorForceS
etAttributeOnThis(name, v8Value, info); | 64 TestInterfaceNamedConstructorV8Internal::TestInterfaceNamedConstructorForceS
etAttributeOnThis(name, v8Value, info); |
| 65 } | 65 } |
| 66 | 66 |
| 67 } // namespace TestInterfaceNamedConstructorV8Internal | 67 } // namespace TestInterfaceNamedConstructorV8Internal |
| 68 | 68 |
| 69 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceNamedCons
tructorAttributes[] = { | 69 static const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceNamedCons
tructorAttributes[] = { |
| 70 {"testNamedConstructorConstructorAttribute", TestInterfaceNamedConstructorV8
Internal::TestInterfaceNamedConstructorConstructorGetter, TestInterfaceNamedCons
tructorV8Internal::TestInterfaceNamedConstructorForceSetAttributeOnThisCallback,
0, 0, const_cast<WrapperTypeInfo*>(&V8TestNamedConstructor::wrapperTypeInfo), s
tatic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v
8::DontEnum), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnIns
tance}, | 70 {"testNamedConstructorConstructorAttribute", TestInterfaceNamedConstructorV8
Internal::TestInterfaceNamedConstructorConstructorGetter, TestInterfaceNamedCons
tructorV8Internal::TestInterfaceNamedConstructorForceSetAttributeOnThisCallback,
0, 0, const_cast<WrapperTypeInfo*>(&V8TestNamedConstructor::wrapperTypeInfo), s
tatic_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v
8::DontEnum), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnIns
tance}, |
| 71 }; | 71 }; |
| 72 | 72 |
| 73 const WrapperTypeInfo V8TestInterfaceNamedConstructorConstructor::wrapperTypeInf
o = { gin::kEmbedderBlink, V8TestInterfaceNamedConstructorConstructor::domTempla
te, V8TestInterfaceNamedConstructor::derefObject, V8TestInterfaceNamedConstructo
r::toActiveDOMObject, 0, 0, V8TestInterfaceNamedConstructor::installConditionall
yEnabledMethods, 0, WrapperTypeObjectPrototype, RefCountedObject }; | 73 const WrapperTypeInfo V8TestInterfaceNamedConstructorConstructor::wrapperTypeInf
o = { gin::kEmbedderBlink, V8TestInterfaceNamedConstructorConstructor::domTempla
te, V8TestInterfaceNamedConstructor::derefObject, V8TestInterfaceNamedConstructo
r::toActiveDOMObject, 0, 0, V8TestInterfaceNamedConstructor::installPerContextEn
abledMethods, 0, WrapperTypeObjectPrototype, RefCountedObject }; |
| 74 | 74 |
| 75 static void V8TestInterfaceNamedConstructorConstructorCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) | 75 static void V8TestInterfaceNamedConstructorConstructorCallback(const v8::Functio
nCallbackInfo<v8::Value>& info) |
| 76 { | 76 { |
| 77 if (!info.IsConstructCall()) { | 77 if (!info.IsConstructCall()) { |
| 78 throwTypeError(ExceptionMessages::constructorNotCallableAsFunction("Audi
o"), info.GetIsolate()); | 78 throwTypeError(ExceptionMessages::constructorNotCallableAsFunction("Audi
o"), info.GetIsolate()); |
| 79 return; | 79 return; |
| 80 } | 80 } |
| 81 | 81 |
| 82 if (ConstructorMode::current(info.GetIsolate()) == ConstructorMode::WrapExis
tingObject) { | 82 if (ConstructorMode::current(info.GetIsolate()) == ConstructorMode::WrapExis
tingObject) { |
| 83 v8SetReturnValue(info, info.Holder()); | 83 v8SetReturnValue(info, info.Holder()); |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 const WrapperTypeInfo* actualInfo = ScriptWrappable::fromObject(impl.get
())->typeInfo(); | 206 const WrapperTypeInfo* actualInfo = ScriptWrappable::fromObject(impl.get
())->typeInfo(); |
| 207 // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapper
TypeInfo. These will both have | 207 // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapper
TypeInfo. These will both have |
| 208 // the same object de-ref functions, though, so use that as the basis of
the check. | 208 // the same object de-ref functions, though, so use that as the basis of
the check. |
| 209 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction
== wrapperTypeInfo.derefObjectFunction); | 209 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction
== wrapperTypeInfo.derefObjectFunction); |
| 210 } | 210 } |
| 211 | 211 |
| 212 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext
, &wrapperTypeInfo, toInternalPointer(impl.get()), isolate); | 212 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext
, &wrapperTypeInfo, toInternalPointer(impl.get()), isolate); |
| 213 if (UNLIKELY(wrapper.IsEmpty())) | 213 if (UNLIKELY(wrapper.IsEmpty())) |
| 214 return wrapper; | 214 return wrapper; |
| 215 | 215 |
| 216 installConditionallyEnabledProperties(wrapper, isolate); | 216 installPerContextEnabledProperties(wrapper, impl.get(), isolate); |
| 217 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceNamedConstructor>(im
pl, &wrapperTypeInfo, wrapper, isolate, WrapperConfiguration::Dependent); | 217 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceNamedConstructor>(im
pl, &wrapperTypeInfo, wrapper, isolate, WrapperConfiguration::Dependent); |
| 218 return wrapper; | 218 return wrapper; |
| 219 } | 219 } |
| 220 | 220 |
| 221 void V8TestInterfaceNamedConstructor::derefObject(void* object) | 221 void V8TestInterfaceNamedConstructor::derefObject(void* object) |
| 222 { | 222 { |
| 223 fromInternalPointer(object)->deref(); | 223 fromInternalPointer(object)->deref(); |
| 224 } | 224 } |
| 225 | 225 |
| 226 template<> | 226 template<> |
| 227 v8::Handle<v8::Value> toV8NoInline(TestInterfaceNamedConstructor* impl, v8::Hand
le<v8::Object> creationContext, v8::Isolate* isolate) | 227 v8::Handle<v8::Value> toV8NoInline(TestInterfaceNamedConstructor* impl, v8::Hand
le<v8::Object> creationContext, v8::Isolate* isolate) |
| 228 { | 228 { |
| 229 return toV8(impl, creationContext, isolate); | 229 return toV8(impl, creationContext, isolate); |
| 230 } | 230 } |
| 231 | 231 |
| 232 } // namespace blink | 232 } // namespace blink |
| OLD | NEW |