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