| 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 "V8TestException.h" | 8 #include "V8TestException.h" |
| 9 | 9 |
| 10 #include "bindings/core/v8/ExceptionState.h" | 10 #include "bindings/core/v8/ExceptionState.h" |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 v8::Handle<v8::Object> V8TestException::findInstanceInPrototypeChain(v8::Handle<
v8::Value> v8Value, v8::Isolate* isolate) | 131 v8::Handle<v8::Object> V8TestException::findInstanceInPrototypeChain(v8::Handle<
v8::Value> v8Value, v8::Isolate* isolate) |
| 132 { | 132 { |
| 133 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); | 133 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); |
| 134 } | 134 } |
| 135 | 135 |
| 136 TestException* V8TestException::toNativeWithTypeCheck(v8::Isolate* isolate, v8::
Handle<v8::Value> value) | 136 TestException* V8TestException::toNativeWithTypeCheck(v8::Isolate* isolate, v8::
Handle<v8::Value> value) |
| 137 { | 137 { |
| 138 return hasInstance(value, isolate) ? fromInternalPointer(blink::toInternalPo
inter(v8::Handle<v8::Object>::Cast(value))) : 0; | 138 return hasInstance(value, isolate) ? fromInternalPointer(blink::toInternalPo
inter(v8::Handle<v8::Object>::Cast(value))) : 0; |
| 139 } | 139 } |
| 140 | 140 |
| 141 v8::Handle<v8::Object> wrap(TestException* impl, v8::Handle<v8::Object> creation
Context, v8::Isolate* isolate) | |
| 142 { | |
| 143 ASSERT(impl); | |
| 144 ASSERT(!DOMDataStore::containsWrapper<V8TestException>(impl, isolate)); | |
| 145 return V8TestException::createWrapper(impl, creationContext, isolate); | |
| 146 } | |
| 147 | |
| 148 v8::Handle<v8::Object> V8TestException::createWrapper(PassRefPtr<TestException>
impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate) | |
| 149 { | |
| 150 ASSERT(impl); | |
| 151 ASSERT(!DOMDataStore::containsWrapper<V8TestException>(impl.get(), isolate))
; | |
| 152 const WrapperTypeInfo* actualInfo = impl->typeInfo(); | |
| 153 // Might be a XXXConstructor::wrapperTypeInfo instead of an XXX::wrapperType
Info. These will both have | |
| 154 // the same object de-ref functions, though, so use that as the basis of the
check. | |
| 155 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(actualInfo->derefObjectFunction ==
wrapperTypeInfo.derefObjectFunction); | |
| 156 | |
| 157 v8::Handle<v8::Object> wrapper = V8DOMWrapper::createWrapper(creationContext
, &wrapperTypeInfo, toInternalPointer(impl.get()), isolate); | |
| 158 if (UNLIKELY(wrapper.IsEmpty())) | |
| 159 return wrapper; | |
| 160 | |
| 161 installConditionallyEnabledProperties(wrapper, isolate); | |
| 162 V8DOMWrapper::associateObjectWithWrapper<V8TestException>(impl, &wrapperType
Info, wrapper, isolate); | |
| 163 return wrapper; | |
| 164 } | |
| 165 | |
| 166 | 141 |
| 167 void V8TestException::refObject(ScriptWrappableBase* internalPointer) | 142 void V8TestException::refObject(ScriptWrappableBase* internalPointer) |
| 168 { | 143 { |
| 169 fromInternalPointer(internalPointer)->ref(); | 144 fromInternalPointer(internalPointer)->ref(); |
| 170 } | 145 } |
| 171 | 146 |
| 172 void V8TestException::derefObject(ScriptWrappableBase* internalPointer) | 147 void V8TestException::derefObject(ScriptWrappableBase* internalPointer) |
| 173 { | 148 { |
| 174 fromInternalPointer(internalPointer)->deref(); | 149 fromInternalPointer(internalPointer)->deref(); |
| 175 } | 150 } |
| 176 | 151 |
| 177 PersistentNode* V8TestException::createPersistentHandle(ScriptWrappableBase* int
ernalPointer) | 152 PersistentNode* V8TestException::createPersistentHandle(ScriptWrappableBase* int
ernalPointer) |
| 178 { | 153 { |
| 179 ASSERT_NOT_REACHED(); | 154 ASSERT_NOT_REACHED(); |
| 180 return 0; | 155 return 0; |
| 181 } | 156 } |
| 182 | 157 |
| 183 template<> | 158 template<> |
| 184 v8::Handle<v8::Value> toV8NoInline(TestException* impl, v8::Handle<v8::Object> c
reationContext, v8::Isolate* isolate) | 159 v8::Handle<v8::Value> toV8NoInline(TestException* impl, v8::Handle<v8::Object> c
reationContext, v8::Isolate* isolate) |
| 185 { | 160 { |
| 186 return toV8(impl, creationContext, isolate); | 161 return toV8(impl, creationContext, isolate); |
| 187 } | 162 } |
| 188 | 163 |
| 189 } // namespace blink | 164 } // namespace blink |
| OLD | NEW |