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 "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 Loading... |
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 |
OLD | NEW |