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 "V8TestSpecialOperations.h" | 8 #include "V8TestSpecialOperations.h" |
9 | 9 |
10 #include "bindings/core/v8/ExceptionState.h" | 10 #include "bindings/core/v8/ExceptionState.h" |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Valu
e); | 205 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Valu
e); |
206 } | 206 } |
207 | 207 |
208 v8::Handle<v8::Object> V8TestSpecialOperations::findInstanceInPrototypeChain(v8:
:Handle<v8::Value> v8Value, v8::Isolate* isolate) | 208 v8::Handle<v8::Object> V8TestSpecialOperations::findInstanceInPrototypeChain(v8:
:Handle<v8::Value> v8Value, v8::Isolate* isolate) |
209 { | 209 { |
210 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); | 210 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); |
211 } | 211 } |
212 | 212 |
213 TestSpecialOperations* V8TestSpecialOperations::toNativeWithTypeCheck(v8::Isolat
e* isolate, v8::Handle<v8::Value> value) | 213 TestSpecialOperations* V8TestSpecialOperations::toNativeWithTypeCheck(v8::Isolat
e* isolate, v8::Handle<v8::Value> value) |
214 { | 214 { |
215 return hasInstance(value, isolate) ? fromInternalPointer(v8::Handle<v8::Obje
ct>::Cast(value)->GetAlignedPointerFromInternalField(v8DOMWrapperObjectIndex)) :
0; | 215 return hasInstance(value, isolate) ? fromInternalPointer(blink::toInternalPo
inter(v8::Handle<v8::Object>::Cast(value))) : 0; |
216 } | 216 } |
217 | 217 |
218 v8::Handle<v8::Object> wrap(TestSpecialOperations* impl, v8::Handle<v8::Object>
creationContext, v8::Isolate* isolate) | 218 v8::Handle<v8::Object> wrap(TestSpecialOperations* impl, v8::Handle<v8::Object>
creationContext, v8::Isolate* isolate) |
219 { | 219 { |
220 ASSERT(impl); | 220 ASSERT(impl); |
221 ASSERT(!DOMDataStore::containsWrapper<V8TestSpecialOperations>(impl, isolate
)); | 221 ASSERT(!DOMDataStore::containsWrapper<V8TestSpecialOperations>(impl, isolate
)); |
222 return V8TestSpecialOperations::createWrapper(impl, creationContext, isolate
); | 222 return V8TestSpecialOperations::createWrapper(impl, creationContext, isolate
); |
223 } | 223 } |
224 | 224 |
225 v8::Handle<v8::Object> V8TestSpecialOperations::createWrapper(PassRefPtr<TestSpe
cialOperations> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isola
te) | 225 v8::Handle<v8::Object> V8TestSpecialOperations::createWrapper(PassRefPtr<TestSpe
cialOperations> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isola
te) |
226 { | 226 { |
227 ASSERT(impl); | 227 ASSERT(impl); |
228 ASSERT(!DOMDataStore::containsWrapper<V8TestSpecialOperations>(impl.get(), i
solate)); | 228 ASSERT(!DOMDataStore::containsWrapper<V8TestSpecialOperations>(impl.get(), i
solate)); |
229 if (ScriptWrappable::wrapperCanBeStoredInObject(impl.get())) { | 229 if (ScriptWrappable::wrapperCanBeStoredInObject(impl.get())) { |
230 const WrapperTypeInfo* actualInfo = ScriptWrappable::fromObject(impl.get
())->typeInfo(); | 230 const WrapperTypeInfo* actualInfo = ScriptWrappable::fromObject(impl.get
())->typeInfo(); |
231 // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapper
TypeInfo. These will both have | 231 // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapper
TypeInfo. These will both have |
232 // the same object de-ref functions, though, so use that as the basis of
the check. | 232 // the same object de-ref functions, though, so use that as the basis of
the check. |
233 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction
== wrapperTypeInfo.derefObjectFunction); | 233 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction
== wrapperTypeInfo.derefObjectFunction); |
234 } | 234 } |
235 | 235 |
236 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext
, &wrapperTypeInfo, toInternalPointer(impl.get()), isolate); | 236 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext
, &wrapperTypeInfo, toInternalPointer(impl.get()), isolate); |
237 if (UNLIKELY(wrapper.IsEmpty())) | 237 if (UNLIKELY(wrapper.IsEmpty())) |
238 return wrapper; | 238 return wrapper; |
239 | 239 |
240 installPerContextEnabledProperties(wrapper, impl.get(), isolate); | 240 installPerContextEnabledProperties(wrapper, impl.get(), isolate); |
241 V8DOMWrapper::associateObjectWithWrapper<V8TestSpecialOperations>(impl, &wra
pperTypeInfo, wrapper, isolate, WrapperConfiguration::Independent); | 241 V8DOMWrapper::associateObjectWithWrapper<V8TestSpecialOperations>(impl, &wra
pperTypeInfo, wrapper, isolate, WrapperConfiguration::Independent); |
242 return wrapper; | 242 return wrapper; |
243 } | 243 } |
244 | 244 |
245 void V8TestSpecialOperations::derefObject(void* object) | 245 void V8TestSpecialOperations::derefObject(ScriptWrappableBase* internalPointer) |
246 { | 246 { |
247 fromInternalPointer(object)->deref(); | 247 fromInternalPointer(internalPointer)->deref(); |
248 } | 248 } |
249 | 249 |
250 template<> | 250 template<> |
251 v8::Handle<v8::Value> toV8NoInline(TestSpecialOperations* impl, v8::Handle<v8::O
bject> creationContext, v8::Isolate* isolate) | 251 v8::Handle<v8::Value> toV8NoInline(TestSpecialOperations* impl, v8::Handle<v8::O
bject> creationContext, v8::Isolate* isolate) |
252 { | 252 { |
253 return toV8(impl, creationContext, isolate); | 253 return toV8(impl, creationContext, isolate); |
254 } | 254 } |
255 | 255 |
256 } // namespace blink | 256 } // namespace blink |
OLD | NEW |