| 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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 v8::Handle<v8::Object> V8TestSpecialOperations::findInstanceInPrototypeChain(v8:
:Handle<v8::Value> v8Value, v8::Isolate* isolate) | 207 v8::Handle<v8::Object> V8TestSpecialOperations::findInstanceInPrototypeChain(v8:
:Handle<v8::Value> v8Value, v8::Isolate* isolate) |
| 208 { | 208 { |
| 209 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); | 209 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); |
| 210 } | 210 } |
| 211 | 211 |
| 212 TestSpecialOperations* V8TestSpecialOperations::toNativeWithTypeCheck(v8::Isolat
e* isolate, v8::Handle<v8::Value> value) | 212 TestSpecialOperations* V8TestSpecialOperations::toNativeWithTypeCheck(v8::Isolat
e* isolate, v8::Handle<v8::Value> value) |
| 213 { | 213 { |
| 214 return hasInstance(value, isolate) ? fromInternalPointer(blink::toInternalPo
inter(v8::Handle<v8::Object>::Cast(value))) : 0; | 214 return hasInstance(value, isolate) ? fromInternalPointer(blink::toInternalPo
inter(v8::Handle<v8::Object>::Cast(value))) : 0; |
| 215 } | 215 } |
| 216 | 216 |
| 217 v8::Handle<v8::Object> wrap(TestSpecialOperations* impl, v8::Handle<v8::Object>
creationContext, v8::Isolate* isolate) | |
| 218 { | |
| 219 ASSERT(impl); | |
| 220 ASSERT(!DOMDataStore::containsWrapper<V8TestSpecialOperations>(impl, isolate
)); | |
| 221 return V8TestSpecialOperations::createWrapper(impl, creationContext, isolate
); | |
| 222 } | |
| 223 | |
| 224 v8::Handle<v8::Object> V8TestSpecialOperations::createWrapper(PassRefPtr<TestSpe
cialOperations> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isola
te) | |
| 225 { | |
| 226 ASSERT(impl); | |
| 227 ASSERT(!DOMDataStore::containsWrapper<V8TestSpecialOperations>(impl.get(), i
solate)); | |
| 228 const WrapperTypeInfo* actualInfo = impl->typeInfo(); | |
| 229 // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapperType
Info. These will both have | |
| 230 // the same object de-ref functions, though, so use that as the basis of the
check. | |
| 231 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction ==
wrapperTypeInfo.derefObjectFunction); | |
| 232 | |
| 233 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext
, &wrapperTypeInfo, toInternalPointer(impl.get()), isolate); | |
| 234 if (UNLIKELY(wrapper.IsEmpty())) | |
| 235 return wrapper; | |
| 236 | |
| 237 installConditionallyEnabledProperties(wrapper, isolate); | |
| 238 V8DOMWrapper::associateObjectWithWrapper<V8TestSpecialOperations>(impl, &wra
pperTypeInfo, wrapper, isolate); | |
| 239 return wrapper; | |
| 240 } | |
| 241 | |
| 242 | 217 |
| 243 void V8TestSpecialOperations::refObject(ScriptWrappableBase* internalPointer) | 218 void V8TestSpecialOperations::refObject(ScriptWrappableBase* internalPointer) |
| 244 { | 219 { |
| 245 fromInternalPointer(internalPointer)->ref(); | 220 fromInternalPointer(internalPointer)->ref(); |
| 246 } | 221 } |
| 247 | 222 |
| 248 void V8TestSpecialOperations::derefObject(ScriptWrappableBase* internalPointer) | 223 void V8TestSpecialOperations::derefObject(ScriptWrappableBase* internalPointer) |
| 249 { | 224 { |
| 250 fromInternalPointer(internalPointer)->deref(); | 225 fromInternalPointer(internalPointer)->deref(); |
| 251 } | 226 } |
| 252 | 227 |
| 253 PersistentNode* V8TestSpecialOperations::createPersistentHandle(ScriptWrappableB
ase* internalPointer) | 228 PersistentNode* V8TestSpecialOperations::createPersistentHandle(ScriptWrappableB
ase* internalPointer) |
| 254 { | 229 { |
| 255 ASSERT_NOT_REACHED(); | 230 ASSERT_NOT_REACHED(); |
| 256 return 0; | 231 return 0; |
| 257 } | 232 } |
| 258 | 233 |
| 259 template<> | 234 template<> |
| 260 v8::Handle<v8::Value> toV8NoInline(TestSpecialOperations* impl, v8::Handle<v8::O
bject> creationContext, v8::Isolate* isolate) | 235 v8::Handle<v8::Value> toV8NoInline(TestSpecialOperations* impl, v8::Handle<v8::O
bject> creationContext, v8::Isolate* isolate) |
| 261 { | 236 { |
| 262 return toV8(impl, creationContext, isolate); | 237 return toV8(impl, creationContext, isolate); |
| 263 } | 238 } |
| 264 | 239 |
| 265 } // namespace blink | 240 } // namespace blink |
| OLD | NEW |