OLD | NEW |
1 /* | 1 /* |
2 This file is part of the Blink open source project. | 2 This file is part of the Blink open source project. |
3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY! | 3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY! |
4 | 4 |
5 This library is free software; you can redistribute it and/or | 5 This library is free software; you can redistribute it and/or |
6 modify it under the terms of the GNU Library General Public | 6 modify it under the terms of the GNU Library General Public |
7 License as published by the Free Software Foundation; either | 7 License as published by the Free Software Foundation; either |
8 version 2 of the License, or (at your option) any later version. | 8 version 2 of the License, or (at your option) any later version. |
9 | 9 |
10 This library is distributed in the hope that it will be useful, | 10 This library is distributed in the hope that it will be useful, |
(...skipping 18 matching lines...) Expand all Loading... |
29 namespace WebCore { | 29 namespace WebCore { |
30 | 30 |
31 class Dictionary; | 31 class Dictionary; |
32 class V8TestEventConstructor { | 32 class V8TestEventConstructor { |
33 public: | 33 public: |
34 static bool HasInstance(v8::Handle<v8::Value>, v8::Isolate*, WrapperWorldTyp
e); | 34 static bool HasInstance(v8::Handle<v8::Value>, v8::Isolate*, WrapperWorldTyp
e); |
35 static bool HasInstanceInAnyWorld(v8::Handle<v8::Value>, v8::Isolate*); | 35 static bool HasInstanceInAnyWorld(v8::Handle<v8::Value>, v8::Isolate*); |
36 static v8::Handle<v8::FunctionTemplate> GetTemplate(v8::Isolate*, WrapperWor
ldType); | 36 static v8::Handle<v8::FunctionTemplate> GetTemplate(v8::Isolate*, WrapperWor
ldType); |
37 static TestEventConstructor* toNative(v8::Handle<v8::Object> object) | 37 static TestEventConstructor* toNative(v8::Handle<v8::Object> object) |
38 { | 38 { |
39 return reinterpret_cast<TestEventConstructor*>(object->GetAlignedPointer
FromInternalField(v8DOMWrapperObjectIndex)); | 39 return fromInternalPointer(object->GetAlignedPointerFromInternalField(v8
DOMWrapperObjectIndex)); |
40 } | 40 } |
41 static void derefObject(void*); | 41 static void derefObject(void*); |
42 static WrapperTypeInfo info; | 42 static WrapperTypeInfo info; |
43 static void constructorCallback(const v8::FunctionCallbackInfo<v8::Value>&); | 43 static void constructorCallback(const v8::FunctionCallbackInfo<v8::Value>&); |
44 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0
; | 44 static const int internalFieldCount = v8DefaultWrapperInternalFieldCount + 0
; |
| 45 static inline void* toInternalPointer(TestEventConstructor* impl) |
| 46 { |
| 47 return impl; |
| 48 } |
| 49 |
| 50 static inline TestEventConstructor* fromInternalPointer(void* object) |
| 51 { |
| 52 return static_cast<TestEventConstructor*>(object); |
| 53 } |
45 static void installPerContextProperties(v8::Handle<v8::Object>, TestEventCon
structor*, v8::Isolate*) { } | 54 static void installPerContextProperties(v8::Handle<v8::Object>, TestEventCon
structor*, v8::Isolate*) { } |
46 static void installPerContextPrototypeProperties(v8::Handle<v8::Object>, v8:
:Isolate*) { } | 55 static void installPerContextPrototypeProperties(v8::Handle<v8::Object>, v8:
:Isolate*) { } |
47 private: | 56 private: |
48 friend v8::Handle<v8::Object> wrap(TestEventConstructor*, v8::Handle<v8::Obj
ect> creationContext, v8::Isolate*); | 57 friend v8::Handle<v8::Object> wrap(TestEventConstructor*, v8::Handle<v8::Obj
ect> creationContext, v8::Isolate*); |
49 static v8::Handle<v8::Object> createWrapper(PassRefPtr<TestEventConstructor>
, v8::Handle<v8::Object> creationContext, v8::Isolate*); | 58 static v8::Handle<v8::Object> createWrapper(PassRefPtr<TestEventConstructor>
, v8::Handle<v8::Object> creationContext, v8::Isolate*); |
50 }; | 59 }; |
51 | 60 |
52 template<> | 61 template<> |
53 class WrapperTypeTraits<TestEventConstructor > { | 62 class WrapperTypeTraits<TestEventConstructor > { |
54 public: | 63 public: |
55 static WrapperTypeInfo* info() { return &V8TestEventConstructor::info; } | 64 static WrapperTypeInfo* info() { return &V8TestEventConstructor::info; } |
56 }; | 65 }; |
57 | 66 |
58 | 67 |
59 inline v8::Handle<v8::Object> wrap(TestEventConstructor* impl, v8::Handle<v8::Ob
ject> creationContext, v8::Isolate* isolate) | 68 inline v8::Handle<v8::Object> wrap(TestEventConstructor* impl, v8::Handle<v8::Ob
ject> creationContext, v8::Isolate* isolate) |
60 { | 69 { |
61 ASSERT(impl); | 70 ASSERT(impl); |
62 ASSERT(DOMDataStore::getWrapper(impl, isolate).IsEmpty()); | 71 ASSERT(DOMDataStore::getWrapper<V8TestEventConstructor>(impl, isolate).IsEmp
ty()); |
63 if (ScriptWrappable::wrapperCanBeStoredInObject(impl)) { | 72 if (ScriptWrappable::wrapperCanBeStoredInObject(impl)) { |
64 const WrapperTypeInfo* actualInfo = ScriptWrappable::getTypeInfoFromObje
ct(impl); | 73 const WrapperTypeInfo* actualInfo = ScriptWrappable::getTypeInfoFromObje
ct(impl); |
65 // Might be a XXXConstructor::info instead of an XXX::info. These will b
oth have | 74 // Might be a XXXConstructor::info instead of an XXX::info. These will b
oth have |
66 // the same object de-ref functions, though, so use that as the basis of
the check. | 75 // the same object de-ref functions, though, so use that as the basis of
the check. |
67 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction
== V8TestEventConstructor::info.derefObjectFunction); | 76 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction
== V8TestEventConstructor::info.derefObjectFunction); |
68 } | 77 } |
69 return V8TestEventConstructor::createWrapper(impl, creationContext, isolate)
; | 78 return V8TestEventConstructor::createWrapper(impl, creationContext, isolate)
; |
70 } | 79 } |
71 | 80 |
72 inline v8::Handle<v8::Value> toV8(TestEventConstructor* impl, v8::Handle<v8::Obj
ect> creationContext, v8::Isolate* isolate) | 81 inline v8::Handle<v8::Value> toV8(TestEventConstructor* impl, v8::Handle<v8::Obj
ect> creationContext, v8::Isolate* isolate) |
73 { | 82 { |
74 if (UNLIKELY(!impl)) | 83 if (UNLIKELY(!impl)) |
75 return v8NullWithCheck(isolate); | 84 return v8NullWithCheck(isolate); |
76 v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapper(impl, isolate); | 85 v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapper<V8TestEventConstruc
tor>(impl, isolate); |
77 if (!wrapper.IsEmpty()) | 86 if (!wrapper.IsEmpty()) |
78 return wrapper; | 87 return wrapper; |
79 return wrap(impl, creationContext, isolate); | 88 return wrap(impl, creationContext, isolate); |
80 } | 89 } |
81 | 90 |
82 inline v8::Handle<v8::Value> toV8ForMainWorld(TestEventConstructor* impl, v8::Ha
ndle<v8::Object> creationContext, v8::Isolate* isolate) | 91 inline v8::Handle<v8::Value> toV8ForMainWorld(TestEventConstructor* impl, v8::Ha
ndle<v8::Object> creationContext, v8::Isolate* isolate) |
83 { | 92 { |
84 ASSERT(worldType(isolate) == MainWorld); | 93 ASSERT(worldType(isolate) == MainWorld); |
85 if (UNLIKELY(!impl)) | 94 if (UNLIKELY(!impl)) |
86 return v8NullWithCheck(isolate); | 95 return v8NullWithCheck(isolate); |
87 v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapperForMainWorld(impl); | 96 v8::Handle<v8::Value> wrapper = DOMDataStore::getWrapperForMainWorld<V8TestE
ventConstructor>(impl); |
88 if (!wrapper.IsEmpty()) | 97 if (!wrapper.IsEmpty()) |
89 return wrapper; | 98 return wrapper; |
90 return wrap(impl, creationContext, isolate); | 99 return wrap(impl, creationContext, isolate); |
91 } | 100 } |
92 | 101 |
93 template<class HolderContainer, class Wrappable> | 102 template<class HolderContainer, class Wrappable> |
94 inline v8::Handle<v8::Value> toV8Fast(TestEventConstructor* impl, const HolderCo
ntainer& container, Wrappable* wrappable) | 103 inline v8::Handle<v8::Value> toV8Fast(TestEventConstructor* impl, const HolderCo
ntainer& container, Wrappable* wrappable) |
95 { | 104 { |
96 if (UNLIKELY(!impl)) | 105 if (UNLIKELY(!impl)) |
97 return v8::Null(container.GetIsolate()); | 106 return v8::Null(container.GetIsolate()); |
98 v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperFast(impl, containe
r, wrappable); | 107 v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperFast<V8TestEventCon
structor>(impl, container, wrappable); |
99 if (!wrapper.IsEmpty()) | 108 if (!wrapper.IsEmpty()) |
100 return wrapper; | 109 return wrapper; |
101 return wrap(impl, container.Holder(), container.GetIsolate()); | 110 return wrap(impl, container.Holder(), container.GetIsolate()); |
102 } | 111 } |
103 | 112 |
104 template<class HolderContainer, class Wrappable> | 113 template<class HolderContainer, class Wrappable> |
105 inline v8::Handle<v8::Value> toV8FastForMainWorld(TestEventConstructor* impl, co
nst HolderContainer& container, Wrappable* wrappable) | 114 inline v8::Handle<v8::Value> toV8FastForMainWorld(TestEventConstructor* impl, co
nst HolderContainer& container, Wrappable* wrappable) |
106 { | 115 { |
107 ASSERT(worldType(container.GetIsolate()) == MainWorld); | 116 ASSERT(worldType(container.GetIsolate()) == MainWorld); |
108 if (UNLIKELY(!impl)) | 117 if (UNLIKELY(!impl)) |
109 return v8::Null(container.GetIsolate()); | 118 return v8::Null(container.GetIsolate()); |
110 v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperForMainWorld(impl); | 119 v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapperForMainWorld<V8Test
EventConstructor>(impl); |
111 if (!wrapper.IsEmpty()) | 120 if (!wrapper.IsEmpty()) |
112 return wrapper; | 121 return wrapper; |
113 return wrap(impl, container.Holder(), container.GetIsolate()); | 122 return wrap(impl, container.Holder(), container.GetIsolate()); |
114 } | 123 } |
115 | 124 |
116 template<class HolderContainer, class Wrappable> | 125 template<class HolderContainer, class Wrappable> |
117 inline v8::Handle<v8::Value> toV8FastForMainWorld(PassRefPtr< TestEventConstruct
or > impl, const HolderContainer& container, Wrappable* wrappable) | 126 inline v8::Handle<v8::Value> toV8FastForMainWorld(PassRefPtr< TestEventConstruct
or > impl, const HolderContainer& container, Wrappable* wrappable) |
118 { | 127 { |
119 return toV8FastForMainWorld(impl.get(), container, wrappable); | 128 return toV8FastForMainWorld(impl.get(), container, wrappable); |
120 } | 129 } |
121 | 130 |
122 | 131 |
123 template<class HolderContainer, class Wrappable> | 132 template<class HolderContainer, class Wrappable> |
124 inline v8::Handle<v8::Value> toV8Fast(PassRefPtr< TestEventConstructor > impl, c
onst HolderContainer& container, Wrappable* wrappable) | 133 inline v8::Handle<v8::Value> toV8Fast(PassRefPtr< TestEventConstructor > impl, c
onst HolderContainer& container, Wrappable* wrappable) |
125 { | 134 { |
126 return toV8Fast(impl.get(), container, wrappable); | 135 return toV8Fast(impl.get(), container, wrappable); |
127 } | 136 } |
128 | 137 |
129 inline v8::Handle<v8::Value> toV8(PassRefPtr< TestEventConstructor > impl, v8::H
andle<v8::Object> creationContext, v8::Isolate* isolate) | 138 inline v8::Handle<v8::Value> toV8(PassRefPtr< TestEventConstructor > impl, v8::H
andle<v8::Object> creationContext, v8::Isolate* isolate) |
130 { | 139 { |
131 return toV8(impl.get(), creationContext, isolate); | 140 return toV8(impl.get(), creationContext, isolate); |
132 } | 141 } |
133 | 142 |
134 bool fillTestEventConstructorInit(TestEventConstructorInit&, const Dictionary&); | 143 bool fillTestEventConstructorInit(TestEventConstructorInit&, const Dictionary&); |
135 | 144 |
136 } | 145 } |
137 | 146 |
138 #endif // V8TestEventConstructor_h | 147 #endif // V8TestEventConstructor_h |
OLD | NEW |