| 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 "V8TestInterfaceConstructor2.h" | 8 #include "V8TestInterfaceConstructor2.h" |
| 9 | 9 |
| 10 #include "bindings/core/v8/Dictionary.h" | 10 #include "bindings/core/v8/Dictionary.h" |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceConstructor2", info.Holder(), info.GetIsolate()); | 83 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte
rfaceConstructor2", info.Holder(), info.GetIsolate()); |
| 84 TestInterfaceEmpty* testInterfaceEmptyArg; | 84 TestInterfaceEmpty* testInterfaceEmptyArg; |
| 85 int longArg; | 85 int longArg; |
| 86 V8StringResource<> defaultUndefinedOptionalStringArg; | 86 V8StringResource<> defaultUndefinedOptionalStringArg; |
| 87 V8StringResource<> defaultNullStringOptionalStringArg; | 87 V8StringResource<> defaultNullStringOptionalStringArg; |
| 88 Dictionary defaultUndefinedOptionalDictionaryArg; | 88 Dictionary defaultUndefinedOptionalDictionaryArg; |
| 89 V8StringResource<> optionalStringArg; | 89 V8StringResource<> optionalStringArg; |
| 90 { | 90 { |
| 91 v8::TryCatch block; | 91 v8::TryCatch block; |
| 92 V8RethrowTryCatchScope rethrow(block); | 92 V8RethrowTryCatchScope rethrow(block); |
| 93 TONATIVE_VOID_INTERNAL(testInterfaceEmptyArg, V8TestInterfaceEmpty::toNa
tiveWithTypeCheck(info.GetIsolate(), info[0])); | 93 TONATIVE_VOID_INTERNAL(testInterfaceEmptyArg, V8TestInterfaceEmpty::toIm
plWithTypeCheck(info.GetIsolate(), info[0])); |
| 94 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[1], exceptio
nState), exceptionState); | 94 TONATIVE_VOID_EXCEPTIONSTATE_INTERNAL(longArg, toInt32(info[1], exceptio
nState), exceptionState); |
| 95 TOSTRING_VOID_INTERNAL(defaultUndefinedOptionalStringArg, info[2]); | 95 TOSTRING_VOID_INTERNAL(defaultUndefinedOptionalStringArg, info[2]); |
| 96 if (!info[3]->IsUndefined()) { | 96 if (!info[3]->IsUndefined()) { |
| 97 TOSTRING_VOID_INTERNAL(defaultNullStringOptionalStringArg, info[3]); | 97 TOSTRING_VOID_INTERNAL(defaultNullStringOptionalStringArg, info[3]); |
| 98 } else { | 98 } else { |
| 99 defaultNullStringOptionalStringArg = nullptr; | 99 defaultNullStringOptionalStringArg = nullptr; |
| 100 } | 100 } |
| 101 TONATIVE_VOID_INTERNAL(defaultUndefinedOptionalDictionaryArg, Dictionary
(info[4], info.GetIsolate())); | 101 TONATIVE_VOID_INTERNAL(defaultUndefinedOptionalDictionaryArg, Dictionary
(info[4], info.GetIsolate())); |
| 102 if (!defaultUndefinedOptionalDictionaryArg.isUndefinedOrNull() && !defau
ltUndefinedOptionalDictionaryArg.isObject()) { | 102 if (!defaultUndefinedOptionalDictionaryArg.isUndefinedOrNull() && !defau
ltUndefinedOptionalDictionaryArg.isObject()) { |
| 103 exceptionState.throwTypeError("parameter 5 ('defaultUndefinedOptiona
lDictionaryArg') is not an object."); | 103 exceptionState.throwTypeError("parameter 5 ('defaultUndefinedOptiona
lDictionaryArg') is not an object."); |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 bool V8TestInterfaceConstructor2::hasInstance(v8::Handle<v8::Value> v8Value, v8:
:Isolate* isolate) | 217 bool V8TestInterfaceConstructor2::hasInstance(v8::Handle<v8::Value> v8Value, v8:
:Isolate* isolate) |
| 218 { | 218 { |
| 219 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Valu
e); | 219 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Valu
e); |
| 220 } | 220 } |
| 221 | 221 |
| 222 v8::Handle<v8::Object> V8TestInterfaceConstructor2::findInstanceInPrototypeChain
(v8::Handle<v8::Value> v8Value, v8::Isolate* isolate) | 222 v8::Handle<v8::Object> V8TestInterfaceConstructor2::findInstanceInPrototypeChain
(v8::Handle<v8::Value> v8Value, v8::Isolate* isolate) |
| 223 { | 223 { |
| 224 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); | 224 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); |
| 225 } | 225 } |
| 226 | 226 |
| 227 TestInterfaceConstructor2* V8TestInterfaceConstructor2::toNativeWithTypeCheck(v8
::Isolate* isolate, v8::Handle<v8::Value> value) | 227 TestInterfaceConstructor2* V8TestInterfaceConstructor2::toImplWithTypeCheck(v8::
Isolate* isolate, v8::Handle<v8::Value> value) |
| 228 { | 228 { |
| 229 return hasInstance(value, isolate) ? fromInternalPointer(blink::toInternalPo
inter(v8::Handle<v8::Object>::Cast(value))) : 0; | 229 return hasInstance(value, isolate) ? blink::toScriptWrappableBase(v8::Handle
<v8::Object>::Cast(value))->toImpl<TestInterfaceConstructor2>() : 0; |
| 230 } | 230 } |
| 231 | 231 |
| 232 | 232 |
| 233 void V8TestInterfaceConstructor2::refObject(ScriptWrappableBase* internalPointer
) | 233 void V8TestInterfaceConstructor2::refObject(ScriptWrappableBase* internalPointer
) |
| 234 { | 234 { |
| 235 fromInternalPointer(internalPointer)->ref(); | 235 internalPointer->toImpl<TestInterfaceConstructor2>()->ref(); |
| 236 } | 236 } |
| 237 | 237 |
| 238 void V8TestInterfaceConstructor2::derefObject(ScriptWrappableBase* internalPoint
er) | 238 void V8TestInterfaceConstructor2::derefObject(ScriptWrappableBase* internalPoint
er) |
| 239 { | 239 { |
| 240 fromInternalPointer(internalPointer)->deref(); | 240 internalPointer->toImpl<TestInterfaceConstructor2>()->deref(); |
| 241 } | 241 } |
| 242 | 242 |
| 243 WrapperPersistentNode* V8TestInterfaceConstructor2::createPersistentHandle(Scrip
tWrappableBase* internalPointer) | 243 WrapperPersistentNode* V8TestInterfaceConstructor2::createPersistentHandle(Scrip
tWrappableBase* internalPointer) |
| 244 { | 244 { |
| 245 ASSERT_NOT_REACHED(); | 245 ASSERT_NOT_REACHED(); |
| 246 return 0; | 246 return 0; |
| 247 } | 247 } |
| 248 | 248 |
| 249 template<> | 249 template<> |
| 250 v8::Handle<v8::Value> toV8NoInline(TestInterfaceConstructor2* impl, v8::Handle<v
8::Object> creationContext, v8::Isolate* isolate) | 250 v8::Handle<v8::Value> toV8NoInline(TestInterfaceConstructor2* impl, v8::Handle<v
8::Object> creationContext, v8::Isolate* isolate) |
| 251 { | 251 { |
| 252 return toV8(impl, creationContext, isolate); | 252 return toV8(impl, creationContext, isolate); |
| 253 } | 253 } |
| 254 | 254 |
| 255 } // namespace blink | 255 } // namespace blink |
| OLD | NEW |