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

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

Issue 531183003: bindings: Retires manual dispatching in createV8{HTML,SVG}Wrapper, etc. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Added FIXME comments. Created 6 years, 3 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 "V8TestInterfaceNode.h" 8 #include "V8TestInterfaceNode.h"
9 9
10 #include "bindings/core/v8/ExceptionState.h" 10 #include "bindings/core/v8/ExceptionState.h"
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 TestInterfaceNode* V8TestInterfaceNode::toNativeWithTypeCheck(v8::Isolate* isola te, v8::Handle<v8::Value> value) 347 TestInterfaceNode* V8TestInterfaceNode::toNativeWithTypeCheck(v8::Isolate* isola te, v8::Handle<v8::Value> value)
348 { 348 {
349 return hasInstance(value, isolate) ? fromInternalPointer(blink::toInternalPo inter(v8::Handle<v8::Object>::Cast(value))) : 0; 349 return hasInstance(value, isolate) ? fromInternalPointer(blink::toInternalPo inter(v8::Handle<v8::Object>::Cast(value))) : 0;
350 } 350 }
351 351
352 EventTarget* V8TestInterfaceNode::toEventTarget(v8::Handle<v8::Object> object) 352 EventTarget* V8TestInterfaceNode::toEventTarget(v8::Handle<v8::Object> object)
353 { 353 {
354 return toNative(object); 354 return toNative(object);
355 } 355 }
356 356
357 v8::Handle<v8::Object> wrap(TestInterfaceNode* impl, v8::Handle<v8::Object> crea tionContext, v8::Isolate* isolate)
358 {
359 ASSERT(impl);
360 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfaceNode>(impl, isolate));
361 return V8TestInterfaceNode::createWrapper(impl, creationContext, isolate);
362 }
363
364 v8::Handle<v8::Object> V8TestInterfaceNode::createWrapper(PassRefPtrWillBeRawPtr <TestInterfaceNode> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* i solate)
365 {
366 ASSERT(impl);
367 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfaceNode>(impl.get(), isola te));
368 const WrapperTypeInfo* actualInfo = impl->typeInfo();
369 // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapperType Info. These will both have
370 // the same object de-ref functions, though, so use that as the basis of the check.
371 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction == wrapperTypeInfo.derefObjectFunction);
372
373 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext , &wrapperTypeInfo, toInternalPointer(impl.get()), isolate);
374 if (UNLIKELY(wrapper.IsEmpty()))
375 return wrapper;
376
377 installConditionallyEnabledProperties(wrapper, isolate);
378 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceNode>(impl, &wrapper TypeInfo, wrapper, isolate);
379 return wrapper;
380 }
381
382 357
383 void V8TestInterfaceNode::refObject(ScriptWrappableBase* internalPointer) 358 void V8TestInterfaceNode::refObject(ScriptWrappableBase* internalPointer)
384 { 359 {
385 #if !ENABLE(OILPAN) 360 #if !ENABLE(OILPAN)
386 fromInternalPointer(internalPointer)->ref(); 361 fromInternalPointer(internalPointer)->ref();
387 #endif 362 #endif
388 } 363 }
389 364
390 void V8TestInterfaceNode::derefObject(ScriptWrappableBase* internalPointer) 365 void V8TestInterfaceNode::derefObject(ScriptWrappableBase* internalPointer)
391 { 366 {
(...skipping 12 matching lines...) Expand all
404 #endif 379 #endif
405 } 380 }
406 381
407 template<> 382 template<>
408 v8::Handle<v8::Value> toV8NoInline(TestInterfaceNode* impl, v8::Handle<v8::Objec t> creationContext, v8::Isolate* isolate) 383 v8::Handle<v8::Value> toV8NoInline(TestInterfaceNode* impl, v8::Handle<v8::Objec t> creationContext, v8::Isolate* isolate)
409 { 384 {
410 return toV8(impl, creationContext, isolate); 385 return toV8(impl, creationContext, isolate);
411 } 386 }
412 387
413 } // namespace blink 388 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698