Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(346)

Side by Side Diff: Source/bindings/tests/results/V8TestNode.cpp

Issue 456683002: bindings: Introduces type-check for the internal pointers. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Synced. Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Valu e); 225 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Valu e);
226 } 226 }
227 227
228 v8::Handle<v8::Object> V8TestNode::findInstanceInPrototypeChain(v8::Handle<v8::V alue> v8Value, v8::Isolate* isolate) 228 v8::Handle<v8::Object> V8TestNode::findInstanceInPrototypeChain(v8::Handle<v8::V alue> v8Value, v8::Isolate* isolate)
229 { 229 {
230 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe rTypeInfo, v8Value); 230 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe rTypeInfo, v8Value);
231 } 231 }
232 232
233 TestNode* V8TestNode::toNativeWithTypeCheck(v8::Isolate* isolate, v8::Handle<v8: :Value> value) 233 TestNode* V8TestNode::toNativeWithTypeCheck(v8::Isolate* isolate, v8::Handle<v8: :Value> value)
234 { 234 {
235 return hasInstance(value, isolate) ? fromInternalPointer(v8::Handle<v8::Obje ct>::Cast(value)->GetAlignedPointerFromInternalField(v8DOMWrapperObjectIndex)) : 0; 235 return hasInstance(value, isolate) ? fromInternalPointer(blink::toInternalPo inter(v8::Handle<v8::Object>::Cast(value))) : 0;
236 } 236 }
237 237
238 EventTarget* V8TestNode::toEventTarget(v8::Handle<v8::Object> object) 238 EventTarget* V8TestNode::toEventTarget(v8::Handle<v8::Object> object)
239 { 239 {
240 return toNative(object); 240 return toNative(object);
241 } 241 }
242 242
243 v8::Handle<v8::Object> wrap(TestNode* impl, v8::Handle<v8::Object> creationConte xt, v8::Isolate* isolate) 243 v8::Handle<v8::Object> wrap(TestNode* impl, v8::Handle<v8::Object> creationConte xt, v8::Isolate* isolate)
244 { 244 {
245 ASSERT(impl); 245 ASSERT(impl);
(...skipping 14 matching lines...) Expand all
260 260
261 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext , &wrapperTypeInfo, toInternalPointer(impl.get()), isolate); 261 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext , &wrapperTypeInfo, toInternalPointer(impl.get()), isolate);
262 if (UNLIKELY(wrapper.IsEmpty())) 262 if (UNLIKELY(wrapper.IsEmpty()))
263 return wrapper; 263 return wrapper;
264 264
265 installPerContextEnabledProperties(wrapper, impl.get(), isolate); 265 installPerContextEnabledProperties(wrapper, impl.get(), isolate);
266 V8DOMWrapper::associateObjectWithWrapper<V8TestNode>(impl, &wrapperTypeInfo, wrapper, isolate, WrapperConfiguration::Dependent); 266 V8DOMWrapper::associateObjectWithWrapper<V8TestNode>(impl, &wrapperTypeInfo, wrapper, isolate, WrapperConfiguration::Dependent);
267 return wrapper; 267 return wrapper;
268 } 268 }
269 269
270 void V8TestNode::derefObject(void* object) 270 void V8TestNode::derefObject(ScriptWrappableBase* internalPointer)
271 { 271 {
272 #if !ENABLE(OILPAN) 272 #if !ENABLE(OILPAN)
273 fromInternalPointer(object)->deref(); 273 fromInternalPointer(internalPointer)->deref();
274 #endif // !ENABLE(OILPAN) 274 #endif // !ENABLE(OILPAN)
275 } 275 }
276 276
277 template<> 277 template<>
278 v8::Handle<v8::Value> toV8NoInline(TestNode* impl, v8::Handle<v8::Object> creati onContext, v8::Isolate* isolate) 278 v8::Handle<v8::Value> toV8NoInline(TestNode* impl, v8::Handle<v8::Object> creati onContext, v8::Isolate* isolate)
279 { 279 {
280 return toV8(impl, creationContext, isolate); 280 return toV8(impl, creationContext, isolate);
281 } 281 }
282 282
283 } // namespace blink 283 } // namespace blink
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestNode.h ('k') | Source/bindings/tests/results/V8TestObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698