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

Side by Side Diff: Source/bindings/tests/results/V8TestInterface3.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 "V8TestInterface3.h" 8 #include "V8TestInterface3.h"
9 9
10 #include "bindings/core/v8/ExceptionState.h" 10 #include "bindings/core/v8/ExceptionState.h"
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 v8::Handle<v8::Object> V8TestInterface3::findInstanceInPrototypeChain(v8::Handle <v8::Value> v8Value, v8::Isolate* isolate) 136 v8::Handle<v8::Object> V8TestInterface3::findInstanceInPrototypeChain(v8::Handle <v8::Value> v8Value, v8::Isolate* isolate)
137 { 137 {
138 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe rTypeInfo, v8Value); 138 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe rTypeInfo, v8Value);
139 } 139 }
140 140
141 TestInterface3* V8TestInterface3::toNativeWithTypeCheck(v8::Isolate* isolate, v8 ::Handle<v8::Value> value) 141 TestInterface3* V8TestInterface3::toNativeWithTypeCheck(v8::Isolate* isolate, v8 ::Handle<v8::Value> value)
142 { 142 {
143 return hasInstance(value, isolate) ? fromInternalPointer(blink::toInternalPo inter(v8::Handle<v8::Object>::Cast(value))) : 0; 143 return hasInstance(value, isolate) ? fromInternalPointer(blink::toInternalPo inter(v8::Handle<v8::Object>::Cast(value))) : 0;
144 } 144 }
145 145
146 v8::Handle<v8::Object> wrap(TestInterface3* impl, v8::Handle<v8::Object> creatio nContext, v8::Isolate* isolate)
147 {
148 ASSERT(impl);
149 ASSERT(!DOMDataStore::containsWrapper<V8TestInterface3>(impl, isolate));
150 return V8TestInterface3::createWrapper(impl, creationContext, isolate);
151 }
152
153 v8::Handle<v8::Object> V8TestInterface3::createWrapper(PassRefPtr<TestInterface3 > impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
154 {
155 ASSERT(impl);
156 ASSERT(!DOMDataStore::containsWrapper<V8TestInterface3>(impl.get(), isolate) );
157 const WrapperTypeInfo* actualInfo = impl->typeInfo();
158 // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapperType Info. These will both have
159 // the same object de-ref functions, though, so use that as the basis of the check.
160 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction == wrapperTypeInfo.derefObjectFunction);
161
162 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext , &wrapperTypeInfo, toInternalPointer(impl.get()), isolate);
163 if (UNLIKELY(wrapper.IsEmpty()))
164 return wrapper;
165
166 installConditionallyEnabledProperties(wrapper, isolate);
167 V8DOMWrapper::associateObjectWithWrapper<V8TestInterface3>(impl, &wrapperTyp eInfo, wrapper, isolate);
168 return wrapper;
169 }
170
171 146
172 void V8TestInterface3::refObject(ScriptWrappableBase* internalPointer) 147 void V8TestInterface3::refObject(ScriptWrappableBase* internalPointer)
173 { 148 {
174 fromInternalPointer(internalPointer)->ref(); 149 fromInternalPointer(internalPointer)->ref();
175 } 150 }
176 151
177 void V8TestInterface3::derefObject(ScriptWrappableBase* internalPointer) 152 void V8TestInterface3::derefObject(ScriptWrappableBase* internalPointer)
178 { 153 {
179 fromInternalPointer(internalPointer)->deref(); 154 fromInternalPointer(internalPointer)->deref();
180 } 155 }
181 156
182 WrapperPersistentNode* V8TestInterface3::createPersistentHandle(ScriptWrappableB ase* internalPointer) 157 WrapperPersistentNode* V8TestInterface3::createPersistentHandle(ScriptWrappableB ase* internalPointer)
183 { 158 {
184 ASSERT_NOT_REACHED(); 159 ASSERT_NOT_REACHED();
185 return 0; 160 return 0;
186 } 161 }
187 162
188 template<> 163 template<>
189 v8::Handle<v8::Value> toV8NoInline(TestInterface3* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) 164 v8::Handle<v8::Value> toV8NoInline(TestInterface3* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
190 { 165 {
191 return toV8(impl, creationContext, isolate); 166 return toV8(impl, creationContext, isolate);
192 } 167 }
193 168
194 } // namespace blink 169 } // namespace blink
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestInterface3.h ('k') | Source/bindings/tests/results/V8TestInterfaceCheckSecurity.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698