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

Side by Side Diff: Source/bindings/tests/results/V8TestInterfaceConstructor3.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 "V8TestInterfaceConstructor3.h" 8 #include "V8TestInterfaceConstructor3.h"
9 9
10 #include "bindings/core/v8/ExceptionState.h" 10 #include "bindings/core/v8/ExceptionState.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 v8::Handle<v8::Object> V8TestInterfaceConstructor3::findInstanceInPrototypeChain (v8::Handle<v8::Value> v8Value, v8::Isolate* isolate) 112 v8::Handle<v8::Object> V8TestInterfaceConstructor3::findInstanceInPrototypeChain (v8::Handle<v8::Value> v8Value, v8::Isolate* isolate)
113 { 113 {
114 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe rTypeInfo, v8Value); 114 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe rTypeInfo, v8Value);
115 } 115 }
116 116
117 TestInterfaceConstructor3* V8TestInterfaceConstructor3::toNativeWithTypeCheck(v8 ::Isolate* isolate, v8::Handle<v8::Value> value) 117 TestInterfaceConstructor3* V8TestInterfaceConstructor3::toNativeWithTypeCheck(v8 ::Isolate* isolate, v8::Handle<v8::Value> value)
118 { 118 {
119 return hasInstance(value, isolate) ? fromInternalPointer(blink::toInternalPo inter(v8::Handle<v8::Object>::Cast(value))) : 0; 119 return hasInstance(value, isolate) ? fromInternalPointer(blink::toInternalPo inter(v8::Handle<v8::Object>::Cast(value))) : 0;
120 } 120 }
121 121
122 v8::Handle<v8::Object> wrap(TestInterfaceConstructor3* impl, v8::Handle<v8::Obje ct> creationContext, v8::Isolate* isolate)
123 {
124 ASSERT(impl);
125 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfaceConstructor3>(impl, iso late));
126 return V8TestInterfaceConstructor3::createWrapper(impl, creationContext, iso late);
127 }
128
129 v8::Handle<v8::Object> V8TestInterfaceConstructor3::createWrapper(PassRefPtr<Tes tInterfaceConstructor3> impl, v8::Handle<v8::Object> creationContext, v8::Isolat e* isolate)
130 {
131 ASSERT(impl);
132 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfaceConstructor3>(impl.get( ), isolate));
133 const WrapperTypeInfo* actualInfo = impl->typeInfo();
134 // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapperType Info. These will both have
135 // the same object de-ref functions, though, so use that as the basis of the check.
136 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction == wrapperTypeInfo.derefObjectFunction);
137
138 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext , &wrapperTypeInfo, toInternalPointer(impl.get()), isolate);
139 if (UNLIKELY(wrapper.IsEmpty()))
140 return wrapper;
141
142 installConditionallyEnabledProperties(wrapper, isolate);
143 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor3>(impl, &wrapperTypeInfo, wrapper, isolate);
144 return wrapper;
145 }
146
147 122
148 void V8TestInterfaceConstructor3::refObject(ScriptWrappableBase* internalPointer ) 123 void V8TestInterfaceConstructor3::refObject(ScriptWrappableBase* internalPointer )
149 { 124 {
150 fromInternalPointer(internalPointer)->ref(); 125 fromInternalPointer(internalPointer)->ref();
151 } 126 }
152 127
153 void V8TestInterfaceConstructor3::derefObject(ScriptWrappableBase* internalPoint er) 128 void V8TestInterfaceConstructor3::derefObject(ScriptWrappableBase* internalPoint er)
154 { 129 {
155 fromInternalPointer(internalPointer)->deref(); 130 fromInternalPointer(internalPointer)->deref();
156 } 131 }
157 132
158 WrapperPersistentNode* V8TestInterfaceConstructor3::createPersistentHandle(Scrip tWrappableBase* internalPointer) 133 WrapperPersistentNode* V8TestInterfaceConstructor3::createPersistentHandle(Scrip tWrappableBase* internalPointer)
159 { 134 {
160 ASSERT_NOT_REACHED(); 135 ASSERT_NOT_REACHED();
161 return 0; 136 return 0;
162 } 137 }
163 138
164 template<> 139 template<>
165 v8::Handle<v8::Value> toV8NoInline(TestInterfaceConstructor3* impl, v8::Handle<v 8::Object> creationContext, v8::Isolate* isolate) 140 v8::Handle<v8::Value> toV8NoInline(TestInterfaceConstructor3* impl, v8::Handle<v 8::Object> creationContext, v8::Isolate* isolate)
166 { 141 {
167 return toV8(impl, creationContext, isolate); 142 return toV8(impl, creationContext, isolate);
168 } 143 }
169 144
170 } // namespace blink 145 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698