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 "V8TestInterfaceGarbageCollected.h" | 8 #include "V8TestInterfaceGarbageCollected.h" |
9 | 9 |
10 #include "bindings/core/v8/ExceptionState.h" | 10 #include "bindings/core/v8/ExceptionState.h" |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 TestInterfaceGarbageCollected* V8TestInterfaceGarbageCollected::toNativeWithType
Check(v8::Isolate* isolate, v8::Handle<v8::Value> value) | 178 TestInterfaceGarbageCollected* V8TestInterfaceGarbageCollected::toNativeWithType
Check(v8::Isolate* isolate, v8::Handle<v8::Value> value) |
179 { | 179 { |
180 return hasInstance(value, isolate) ? fromInternalPointer(blink::toInternalPo
inter(v8::Handle<v8::Object>::Cast(value))) : 0; | 180 return hasInstance(value, isolate) ? fromInternalPointer(blink::toInternalPo
inter(v8::Handle<v8::Object>::Cast(value))) : 0; |
181 } | 181 } |
182 | 182 |
183 EventTarget* V8TestInterfaceGarbageCollected::toEventTarget(v8::Handle<v8::Objec
t> object) | 183 EventTarget* V8TestInterfaceGarbageCollected::toEventTarget(v8::Handle<v8::Objec
t> object) |
184 { | 184 { |
185 return toNative(object); | 185 return toNative(object); |
186 } | 186 } |
187 | 187 |
188 v8::Handle<v8::Object> wrap(TestInterfaceGarbageCollected* impl, v8::Handle<v8::
Object> creationContext, v8::Isolate* isolate) | |
189 { | |
190 ASSERT(impl); | |
191 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfaceGarbageCollected>(impl,
isolate)); | |
192 return V8TestInterfaceGarbageCollected::createWrapper(impl, creationContext,
isolate); | |
193 } | |
194 | |
195 v8::Handle<v8::Object> V8TestInterfaceGarbageCollected::createWrapper(RawPtr<Tes
tInterfaceGarbageCollected> impl, v8::Handle<v8::Object> creationContext, v8::Is
olate* isolate) | |
196 { | |
197 ASSERT(impl); | |
198 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfaceGarbageCollected>(impl.
get(), isolate)); | |
199 const WrapperTypeInfo* actualInfo = impl->typeInfo(); | |
200 // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapperType
Info. These will both have | |
201 // the same object de-ref functions, though, so use that as the basis of the
check. | |
202 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction ==
wrapperTypeInfo.derefObjectFunction); | |
203 | |
204 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext
, &wrapperTypeInfo, toInternalPointer(impl.get()), isolate); | |
205 if (UNLIKELY(wrapper.IsEmpty())) | |
206 return wrapper; | |
207 | |
208 installConditionallyEnabledProperties(wrapper, isolate); | |
209 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceGarbageCollected>(im
pl, &wrapperTypeInfo, wrapper, isolate); | |
210 return wrapper; | |
211 } | |
212 | |
213 | 188 |
214 void V8TestInterfaceGarbageCollected::refObject(ScriptWrappableBase* internalPoi
nter) | 189 void V8TestInterfaceGarbageCollected::refObject(ScriptWrappableBase* internalPoi
nter) |
215 { | 190 { |
216 } | 191 } |
217 | 192 |
218 void V8TestInterfaceGarbageCollected::derefObject(ScriptWrappableBase* internalP
ointer) | 193 void V8TestInterfaceGarbageCollected::derefObject(ScriptWrappableBase* internalP
ointer) |
219 { | 194 { |
220 } | 195 } |
221 | 196 |
222 WrapperPersistentNode* V8TestInterfaceGarbageCollected::createPersistentHandle(S
criptWrappableBase* internalPointer) | 197 WrapperPersistentNode* V8TestInterfaceGarbageCollected::createPersistentHandle(S
criptWrappableBase* internalPointer) |
223 { | 198 { |
224 return new WrapperPersistent<TestInterfaceGarbageCollected>(fromInternalPoin
ter(internalPointer)); | 199 return new WrapperPersistent<TestInterfaceGarbageCollected>(fromInternalPoin
ter(internalPointer)); |
225 } | 200 } |
226 | 201 |
227 template<> | 202 template<> |
228 v8::Handle<v8::Value> toV8NoInline(TestInterfaceGarbageCollected* impl, v8::Hand
le<v8::Object> creationContext, v8::Isolate* isolate) | 203 v8::Handle<v8::Value> toV8NoInline(TestInterfaceGarbageCollected* impl, v8::Hand
le<v8::Object> creationContext, v8::Isolate* isolate) |
229 { | 204 { |
230 return toV8(impl, creationContext, isolate); | 205 return toV8(impl, creationContext, isolate); |
231 } | 206 } |
232 | 207 |
233 } // namespace blink | 208 } // namespace blink |
OLD | NEW |