OLD | NEW |
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 "V8TestInterfaceConstructor4.h" | 8 #include "V8TestInterfaceConstructor4.h" |
9 | 9 |
10 #include "bindings/core/v8/ExceptionState.h" | 10 #include "bindings/core/v8/ExceptionState.h" |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 v8::Handle<v8::Object> V8TestInterfaceConstructor4::findInstanceInPrototypeChain
(v8::Handle<v8::Value> v8Value, v8::Isolate* isolate) | 149 v8::Handle<v8::Object> V8TestInterfaceConstructor4::findInstanceInPrototypeChain
(v8::Handle<v8::Value> v8Value, v8::Isolate* isolate) |
150 { | 150 { |
151 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); | 151 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); |
152 } | 152 } |
153 | 153 |
154 TestInterfaceConstructor4* V8TestInterfaceConstructor4::toNativeWithTypeCheck(v8
::Isolate* isolate, v8::Handle<v8::Value> value) | 154 TestInterfaceConstructor4* V8TestInterfaceConstructor4::toNativeWithTypeCheck(v8
::Isolate* isolate, v8::Handle<v8::Value> value) |
155 { | 155 { |
156 return hasInstance(value, isolate) ? fromInternalPointer(blink::toInternalPo
inter(v8::Handle<v8::Object>::Cast(value))) : 0; | 156 return hasInstance(value, isolate) ? fromInternalPointer(blink::toInternalPo
inter(v8::Handle<v8::Object>::Cast(value))) : 0; |
157 } | 157 } |
158 | 158 |
159 v8::Handle<v8::Object> wrap(TestInterfaceConstructor4* impl, v8::Handle<v8::Obje
ct> creationContext, v8::Isolate* isolate) | |
160 { | |
161 ASSERT(impl); | |
162 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfaceConstructor4>(impl, iso
late)); | |
163 return V8TestInterfaceConstructor4::createWrapper(impl, creationContext, iso
late); | |
164 } | |
165 | |
166 v8::Handle<v8::Object> V8TestInterfaceConstructor4::createWrapper(PassRefPtr<Tes
tInterfaceConstructor4> impl, v8::Handle<v8::Object> creationContext, v8::Isolat
e* isolate) | |
167 { | |
168 ASSERT(impl); | |
169 ASSERT(!DOMDataStore::containsWrapper<V8TestInterfaceConstructor4>(impl.get(
), isolate)); | |
170 const WrapperTypeInfo* actualInfo = impl->typeInfo(); | |
171 // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapperType
Info. These will both have | |
172 // the same object de-ref functions, though, so use that as the basis of the
check. | |
173 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction ==
wrapperTypeInfo.derefObjectFunction); | |
174 | |
175 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext
, &wrapperTypeInfo, toInternalPointer(impl.get()), isolate); | |
176 if (UNLIKELY(wrapper.IsEmpty())) | |
177 return wrapper; | |
178 | |
179 installConditionallyEnabledProperties(wrapper, isolate); | |
180 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor4>(impl,
&wrapperTypeInfo, wrapper, isolate); | |
181 return wrapper; | |
182 } | |
183 | |
184 | 159 |
185 void V8TestInterfaceConstructor4::refObject(ScriptWrappableBase* internalPointer
) | 160 void V8TestInterfaceConstructor4::refObject(ScriptWrappableBase* internalPointer
) |
186 { | 161 { |
187 fromInternalPointer(internalPointer)->ref(); | 162 fromInternalPointer(internalPointer)->ref(); |
188 } | 163 } |
189 | 164 |
190 void V8TestInterfaceConstructor4::derefObject(ScriptWrappableBase* internalPoint
er) | 165 void V8TestInterfaceConstructor4::derefObject(ScriptWrappableBase* internalPoint
er) |
191 { | 166 { |
192 fromInternalPointer(internalPointer)->deref(); | 167 fromInternalPointer(internalPointer)->deref(); |
193 } | 168 } |
194 | 169 |
195 WrapperPersistentNode* V8TestInterfaceConstructor4::createPersistentHandle(Scrip
tWrappableBase* internalPointer) | 170 WrapperPersistentNode* V8TestInterfaceConstructor4::createPersistentHandle(Scrip
tWrappableBase* internalPointer) |
196 { | 171 { |
197 ASSERT_NOT_REACHED(); | 172 ASSERT_NOT_REACHED(); |
198 return 0; | 173 return 0; |
199 } | 174 } |
200 | 175 |
201 template<> | 176 template<> |
202 v8::Handle<v8::Value> toV8NoInline(TestInterfaceConstructor4* impl, v8::Handle<v
8::Object> creationContext, v8::Isolate* isolate) | 177 v8::Handle<v8::Value> toV8NoInline(TestInterfaceConstructor4* impl, v8::Handle<v
8::Object> creationContext, v8::Isolate* isolate) |
203 { | 178 { |
204 return toV8(impl, creationContext, isolate); | 179 return toV8(impl, creationContext, isolate); |
205 } | 180 } |
206 | 181 |
207 } // namespace blink | 182 } // namespace blink |
OLD | NEW |