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

Side by Side Diff: Source/bindings/tests/results/V8TestInterfaceEventConstructor.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 "V8TestInterfaceEventConstructor.h" 8 #include "V8TestInterfaceEventConstructor.h"
9 9
10 #include "bindings/core/v8/Dictionary.h" 10 #include "bindings/core/v8/Dictionary.h"
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 v8::Handle<v8::Object> V8TestInterfaceEventConstructor::findInstanceInPrototypeC hain(v8::Handle<v8::Value> v8Value, v8::Isolate* isolate) 380 v8::Handle<v8::Object> V8TestInterfaceEventConstructor::findInstanceInPrototypeC hain(v8::Handle<v8::Value> v8Value, v8::Isolate* isolate)
381 { 381 {
382 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe rTypeInfo, v8Value); 382 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe rTypeInfo, v8Value);
383 } 383 }
384 384
385 TestInterfaceEventConstructor* V8TestInterfaceEventConstructor::toNativeWithType Check(v8::Isolate* isolate, v8::Handle<v8::Value> value) 385 TestInterfaceEventConstructor* V8TestInterfaceEventConstructor::toNativeWithType Check(v8::Isolate* isolate, v8::Handle<v8::Value> value)
386 { 386 {
387 return hasInstance(value, isolate) ? fromInternalPointer(blink::toInternalPo inter(v8::Handle<v8::Object>::Cast(value))) : 0; 387 return hasInstance(value, isolate) ? fromInternalPointer(blink::toInternalPo inter(v8::Handle<v8::Object>::Cast(value))) : 0;
388 } 388 }
389 389
390 v8::Handle<v8::Object> wrap(TestInterfaceEventConstructor* impl, v8::Handle<v8:: Object> creationContext, v8::Isolate* isolate)
391 {
392 ASSERT(impl);
393 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfaceEventConstructor>(impl, isolate));
394 return V8TestInterfaceEventConstructor::createWrapper(impl, creationContext, isolate);
395 }
396
397 v8::Handle<v8::Object> V8TestInterfaceEventConstructor::createWrapper(PassRefPtr WillBeRawPtr<TestInterfaceEventConstructor> impl, v8::Handle<v8::Object> creatio nContext, v8::Isolate* isolate)
398 {
399 ASSERT(impl);
400 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfaceEventConstructor>(impl. get(), isolate));
401 const WrapperTypeInfo* actualInfo = impl->typeInfo();
402 // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapperType Info. These will both have
403 // the same object de-ref functions, though, so use that as the basis of the check.
404 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction == wrapperTypeInfo.derefObjectFunction);
405
406 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext , &wrapperTypeInfo, toInternalPointer(impl.get()), isolate);
407 if (UNLIKELY(wrapper.IsEmpty()))
408 return wrapper;
409
410 installConditionallyEnabledProperties(wrapper, isolate);
411 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceEventConstructor>(im pl, &wrapperTypeInfo, wrapper, isolate);
412 return wrapper;
413 }
414
415 390
416 void V8TestInterfaceEventConstructor::refObject(ScriptWrappableBase* internalPoi nter) 391 void V8TestInterfaceEventConstructor::refObject(ScriptWrappableBase* internalPoi nter)
417 { 392 {
418 #if !ENABLE(OILPAN) 393 #if !ENABLE(OILPAN)
419 fromInternalPointer(internalPointer)->ref(); 394 fromInternalPointer(internalPointer)->ref();
420 #endif 395 #endif
421 } 396 }
422 397
423 void V8TestInterfaceEventConstructor::derefObject(ScriptWrappableBase* internalP ointer) 398 void V8TestInterfaceEventConstructor::derefObject(ScriptWrappableBase* internalP ointer)
424 { 399 {
(...skipping 12 matching lines...) Expand all
437 #endif 412 #endif
438 } 413 }
439 414
440 template<> 415 template<>
441 v8::Handle<v8::Value> toV8NoInline(TestInterfaceEventConstructor* impl, v8::Hand le<v8::Object> creationContext, v8::Isolate* isolate) 416 v8::Handle<v8::Value> toV8NoInline(TestInterfaceEventConstructor* impl, v8::Hand le<v8::Object> creationContext, v8::Isolate* isolate)
442 { 417 {
443 return toV8(impl, creationContext, isolate); 418 return toV8(impl, creationContext, isolate);
444 } 419 }
445 420
446 } // namespace blink 421 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698