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 "V8TestInterfaceConstructor.h" | 8 #include "V8TestInterfaceConstructor.h" |
9 | 9 |
10 #include "bindings/core/v8/Dictionary.h" | 10 #include "bindings/core/v8/Dictionary.h" |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 Dictionary dictionaryArg; | 73 Dictionary dictionaryArg; |
74 Vector<String> sequenceStringArg; | 74 Vector<String> sequenceStringArg; |
75 Vector<Dictionary> sequenceDictionaryArg; | 75 Vector<Dictionary> sequenceDictionaryArg; |
76 Dictionary optionalDictionaryArg; | 76 Dictionary optionalDictionaryArg; |
77 TestInterfaceEmpty* optionalTestInterfaceEmptyArg; | 77 TestInterfaceEmpty* optionalTestInterfaceEmptyArg; |
78 { | 78 { |
79 v8::TryCatch block; | 79 v8::TryCatch block; |
80 V8RethrowTryCatchScope rethrow(block); | 80 V8RethrowTryCatchScope rethrow(block); |
81 TONATIVE_VOID_INTERNAL(doubleArg, static_cast<double>(info[0]->NumberVal
ue())); | 81 TONATIVE_VOID_INTERNAL(doubleArg, static_cast<double>(info[0]->NumberVal
ue())); |
82 TOSTRING_VOID_INTERNAL(stringArg, info[1]); | 82 TOSTRING_VOID_INTERNAL(stringArg, info[1]); |
83 TONATIVE_VOID_INTERNAL(testInterfaceEmptyArg, V8TestInterfaceEmpty::toNa
tiveWithTypeCheck(info.GetIsolate(), info[2])); | 83 TONATIVE_VOID_INTERNAL(testInterfaceEmptyArg, V8TestInterfaceEmpty::toIm
plWithTypeCheck(info.GetIsolate(), info[2])); |
84 TONATIVE_VOID_INTERNAL(dictionaryArg, Dictionary(info[3], info.GetIsolat
e())); | 84 TONATIVE_VOID_INTERNAL(dictionaryArg, Dictionary(info[3], info.GetIsolat
e())); |
85 if (!dictionaryArg.isUndefinedOrNull() && !dictionaryArg.isObject()) { | 85 if (!dictionaryArg.isUndefinedOrNull() && !dictionaryArg.isObject()) { |
86 exceptionState.throwTypeError("parameter 4 ('dictionaryArg') is not
an object."); | 86 exceptionState.throwTypeError("parameter 4 ('dictionaryArg') is not
an object."); |
87 exceptionState.throwIfNeeded(); | 87 exceptionState.throwIfNeeded(); |
88 return; | 88 return; |
89 } | 89 } |
90 TONATIVE_VOID_INTERNAL(sequenceStringArg, toNativeArray<String>(info[4],
5, info.GetIsolate())); | 90 TONATIVE_VOID_INTERNAL(sequenceStringArg, toImplArray<String>(info[4], 5
, info.GetIsolate())); |
91 TONATIVE_VOID_INTERNAL(sequenceDictionaryArg, toNativeArray<Dictionary>(
info[5], 6, info.GetIsolate())); | 91 TONATIVE_VOID_INTERNAL(sequenceDictionaryArg, toImplArray<Dictionary>(in
fo[5], 6, info.GetIsolate())); |
92 TONATIVE_VOID_INTERNAL(optionalDictionaryArg, Dictionary(info[6], info.G
etIsolate())); | 92 TONATIVE_VOID_INTERNAL(optionalDictionaryArg, Dictionary(info[6], info.G
etIsolate())); |
93 if (!optionalDictionaryArg.isUndefinedOrNull() && !optionalDictionaryArg
.isObject()) { | 93 if (!optionalDictionaryArg.isUndefinedOrNull() && !optionalDictionaryArg
.isObject()) { |
94 exceptionState.throwTypeError("parameter 7 ('optionalDictionaryArg')
is not an object."); | 94 exceptionState.throwTypeError("parameter 7 ('optionalDictionaryArg')
is not an object."); |
95 exceptionState.throwIfNeeded(); | 95 exceptionState.throwIfNeeded(); |
96 return; | 96 return; |
97 } | 97 } |
98 TONATIVE_VOID_INTERNAL(optionalTestInterfaceEmptyArg, V8TestInterfaceEmp
ty::toNativeWithTypeCheck(info.GetIsolate(), info[7])); | 98 TONATIVE_VOID_INTERNAL(optionalTestInterfaceEmptyArg, V8TestInterfaceEmp
ty::toImplWithTypeCheck(info.GetIsolate(), info[7])); |
99 } | 99 } |
100 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); | 100 ExecutionContext* executionContext = currentExecutionContext(info.GetIsolate
()); |
101 Document& document = *toDocument(currentExecutionContext(info.GetIsolate()))
; | 101 Document& document = *toDocument(currentExecutionContext(info.GetIsolate()))
; |
102 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::create(exe
cutionContext, document, doubleArg, stringArg, testInterfaceEmptyArg, dictionary
Arg, sequenceStringArg, sequenceDictionaryArg, optionalDictionaryArg, optionalTe
stInterfaceEmptyArg, exceptionState); | 102 RefPtr<TestInterfaceConstructor> impl = TestInterfaceConstructor::create(exe
cutionContext, document, doubleArg, stringArg, testInterfaceEmptyArg, dictionary
Arg, sequenceStringArg, sequenceDictionaryArg, optionalDictionaryArg, optionalTe
stInterfaceEmptyArg, exceptionState); |
103 if (exceptionState.hadException()) { | 103 if (exceptionState.hadException()) { |
104 exceptionState.throwIfNeeded(); | 104 exceptionState.throwIfNeeded(); |
105 return; | 105 return; |
106 } | 106 } |
107 v8::Handle<v8::Object> wrapper = info.Holder(); | 107 v8::Handle<v8::Object> wrapper = info.Holder(); |
108 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor>(impl.re
lease(), &V8TestInterfaceConstructor::wrapperTypeInfo, wrapper, info.GetIsolate(
)); | 108 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceConstructor>(impl.re
lease(), &V8TestInterfaceConstructor::wrapperTypeInfo, wrapper, info.GetIsolate(
)); |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 bool V8TestInterfaceConstructor::hasInstance(v8::Handle<v8::Value> v8Value, v8::
Isolate* isolate) | 339 bool V8TestInterfaceConstructor::hasInstance(v8::Handle<v8::Value> v8Value, v8::
Isolate* isolate) |
340 { | 340 { |
341 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Valu
e); | 341 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Valu
e); |
342 } | 342 } |
343 | 343 |
344 v8::Handle<v8::Object> V8TestInterfaceConstructor::findInstanceInPrototypeChain(
v8::Handle<v8::Value> v8Value, v8::Isolate* isolate) | 344 v8::Handle<v8::Object> V8TestInterfaceConstructor::findInstanceInPrototypeChain(
v8::Handle<v8::Value> v8Value, v8::Isolate* isolate) |
345 { | 345 { |
346 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); | 346 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe
rTypeInfo, v8Value); |
347 } | 347 } |
348 | 348 |
349 TestInterfaceConstructor* V8TestInterfaceConstructor::toNativeWithTypeCheck(v8::
Isolate* isolate, v8::Handle<v8::Value> value) | 349 TestInterfaceConstructor* V8TestInterfaceConstructor::toImplWithTypeCheck(v8::Is
olate* isolate, v8::Handle<v8::Value> value) |
350 { | 350 { |
351 return hasInstance(value, isolate) ? fromInternalPointer(blink::toInternalPo
inter(v8::Handle<v8::Object>::Cast(value))) : 0; | 351 return hasInstance(value, isolate) ? blink::toScriptWrappableBase(v8::Handle
<v8::Object>::Cast(value))->toImpl<TestInterfaceConstructor>() : 0; |
352 } | 352 } |
353 | 353 |
354 | 354 |
355 void V8TestInterfaceConstructor::refObject(ScriptWrappableBase* internalPointer) | 355 void V8TestInterfaceConstructor::refObject(ScriptWrappableBase* internalPointer) |
356 { | 356 { |
357 fromInternalPointer(internalPointer)->ref(); | 357 internalPointer->toImpl<TestInterfaceConstructor>()->ref(); |
358 } | 358 } |
359 | 359 |
360 void V8TestInterfaceConstructor::derefObject(ScriptWrappableBase* internalPointe
r) | 360 void V8TestInterfaceConstructor::derefObject(ScriptWrappableBase* internalPointe
r) |
361 { | 361 { |
362 fromInternalPointer(internalPointer)->deref(); | 362 internalPointer->toImpl<TestInterfaceConstructor>()->deref(); |
363 } | 363 } |
364 | 364 |
365 WrapperPersistentNode* V8TestInterfaceConstructor::createPersistentHandle(Script
WrappableBase* internalPointer) | 365 WrapperPersistentNode* V8TestInterfaceConstructor::createPersistentHandle(Script
WrappableBase* internalPointer) |
366 { | 366 { |
367 ASSERT_NOT_REACHED(); | 367 ASSERT_NOT_REACHED(); |
368 return 0; | 368 return 0; |
369 } | 369 } |
370 | 370 |
371 template<> | 371 template<> |
372 v8::Handle<v8::Value> toV8NoInline(TestInterfaceConstructor* impl, v8::Handle<v8
::Object> creationContext, v8::Isolate* isolate) | 372 v8::Handle<v8::Value> toV8NoInline(TestInterfaceConstructor* impl, v8::Handle<v8
::Object> creationContext, v8::Isolate* isolate) |
373 { | 373 { |
374 return toV8(impl, creationContext, isolate); | 374 return toV8(impl, creationContext, isolate); |
375 } | 375 } |
376 | 376 |
377 } // namespace blink | 377 } // namespace blink |
OLD | NEW |