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 "V8TestNode.h" | 8 #include "V8TestNode.h" |
9 | 9 |
10 #include "bindings/core/v8/ExceptionState.h" | 10 #include "bindings/core/v8/ExceptionState.h" |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 TestNode* V8TestNode::toNativeWithTypeCheck(v8::Isolate* isolate, v8::Handle<v8:
:Value> value) | 236 TestNode* V8TestNode::toNativeWithTypeCheck(v8::Isolate* isolate, v8::Handle<v8:
:Value> value) |
237 { | 237 { |
238 return hasInstance(value, isolate) ? fromInternalPointer(blink::toInternalPo
inter(v8::Handle<v8::Object>::Cast(value))) : 0; | 238 return hasInstance(value, isolate) ? fromInternalPointer(blink::toInternalPo
inter(v8::Handle<v8::Object>::Cast(value))) : 0; |
239 } | 239 } |
240 | 240 |
241 EventTarget* V8TestNode::toEventTarget(v8::Handle<v8::Object> object) | 241 EventTarget* V8TestNode::toEventTarget(v8::Handle<v8::Object> object) |
242 { | 242 { |
243 return toNative(object); | 243 return toNative(object); |
244 } | 244 } |
245 | 245 |
246 v8::Handle<v8::Object> wrap(TestNode* impl, v8::Handle<v8::Object> creationConte
xt, v8::Isolate* isolate) | |
247 { | |
248 ASSERT(impl); | |
249 ASSERT(!DOMDataStore::containsWrapper<V8TestNode>(impl, isolate)); | |
250 return V8TestNode::createWrapper(impl, creationContext, isolate); | |
251 } | |
252 | |
253 v8::Handle<v8::Object> V8TestNode::createWrapper(PassRefPtrWillBeRawPtr<TestNode
> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) | |
254 { | |
255 ASSERT(impl); | |
256 ASSERT(!DOMDataStore::containsWrapper<V8TestNode>(impl.get(), isolate)); | |
257 const WrapperTypeInfo* actualInfo = impl->typeInfo(); | |
258 // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapperType
Info. These will both have | |
259 // the same object de-ref functions, though, so use that as the basis of the
check. | |
260 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction ==
wrapperTypeInfo.derefObjectFunction); | |
261 | |
262 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext
, &wrapperTypeInfo, toInternalPointer(impl.get()), isolate); | |
263 if (UNLIKELY(wrapper.IsEmpty())) | |
264 return wrapper; | |
265 | |
266 installConditionallyEnabledProperties(wrapper, isolate); | |
267 V8DOMWrapper::associateObjectWithWrapper<V8TestNode>(impl, &wrapperTypeInfo,
wrapper, isolate); | |
268 return wrapper; | |
269 } | |
270 | |
271 | 246 |
272 void V8TestNode::refObject(ScriptWrappableBase* internalPointer) | 247 void V8TestNode::refObject(ScriptWrappableBase* internalPointer) |
273 { | 248 { |
274 #if !ENABLE(OILPAN) | 249 #if !ENABLE(OILPAN) |
275 fromInternalPointer(internalPointer)->ref(); | 250 fromInternalPointer(internalPointer)->ref(); |
276 #endif | 251 #endif |
277 } | 252 } |
278 | 253 |
279 void V8TestNode::derefObject(ScriptWrappableBase* internalPointer) | 254 void V8TestNode::derefObject(ScriptWrappableBase* internalPointer) |
280 { | 255 { |
(...skipping 12 matching lines...) Expand all Loading... |
293 #endif | 268 #endif |
294 } | 269 } |
295 | 270 |
296 template<> | 271 template<> |
297 v8::Handle<v8::Value> toV8NoInline(TestNode* impl, v8::Handle<v8::Object> creati
onContext, v8::Isolate* isolate) | 272 v8::Handle<v8::Value> toV8NoInline(TestNode* impl, v8::Handle<v8::Object> creati
onContext, v8::Isolate* isolate) |
298 { | 273 { |
299 return toV8(impl, creationContext, isolate); | 274 return toV8(impl, creationContext, isolate); |
300 } | 275 } |
301 | 276 |
302 } // namespace blink | 277 } // namespace blink |
OLD | NEW |