| 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 #if ENABLE(CONDITION) | 8 #if ENABLE(CONDITION) |
| 9 #include "V8TestInterface5.h" | 9 #include "V8TestInterface5.h" |
| 10 | 10 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 { | 45 { |
| 46 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); | 46 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); |
| 47 TestInterface5ImplementationV8Internal::testInterfaceAttributeAttributeGette
r(info); | 47 TestInterface5ImplementationV8Internal::testInterfaceAttributeAttributeGette
r(info); |
| 48 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 48 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 49 } | 49 } |
| 50 | 50 |
| 51 static void testInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) | 51 static void testInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8Value,
const v8::PropertyCallbackInfo<void>& info) |
| 52 { | 52 { |
| 53 v8::Handle<v8::Object> holder = info.Holder(); | 53 v8::Handle<v8::Object> holder = info.Holder(); |
| 54 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceA
ttribute", "TestInterface5", holder, info.GetIsolate()); | 54 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceA
ttribute", "TestInterface5", holder, info.GetIsolate()); |
| 55 if (!V8TestInterface5::hasInstance(v8Value, info.GetIsolate())) { | 55 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); |
| 56 TestInterface5Implementation* cppValue = V8TestInterface5::toImplWithTypeChe
ck(info.GetIsolate(), v8Value); |
| 57 if (!cppValue) { |
| 56 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terface5'."); | 58 exceptionState.throwTypeError("The provided value is not of type 'TestIn
terface5'."); |
| 57 exceptionState.throwIfNeeded(); | 59 exceptionState.throwIfNeeded(); |
| 58 return; | 60 return; |
| 59 } | 61 } |
| 60 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); | |
| 61 TestInterface5Implementation* cppValue = V8TestInterface5::toImpl(v8::Handle
<v8::Object>::Cast(v8Value)); | |
| 62 impl->setTestInterfaceAttribute(WTF::getPtr(cppValue)); | 62 impl->setTestInterfaceAttribute(WTF::getPtr(cppValue)); |
| 63 } | 63 } |
| 64 | 64 |
| 65 static void testInterfaceAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) | 65 static void testInterfaceAttributeAttributeSetterCallback(v8::Local<v8::String>,
v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) |
| 66 { | 66 { |
| 67 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); | 67 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); |
| 68 TestInterface5ImplementationV8Internal::testInterfaceAttributeAttributeSette
r(v8Value, info); | 68 TestInterface5ImplementationV8Internal::testInterfaceAttributeAttributeSette
r(v8Value, info); |
| 69 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 69 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 70 } | 70 } |
| 71 | 71 |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 | 337 |
| 338 static void voidMethodTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) | 338 static void voidMethodTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo
<v8::Value>& info) |
| 339 { | 339 { |
| 340 if (UNLIKELY(info.Length() < 1)) { | 340 if (UNLIKELY(info.Length() < 1)) { |
| 341 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(in
fo.GetIsolate(), "voidMethodTestInterfaceEmptyArg", "TestInterface5", 1, info.Le
ngth()), info.GetIsolate()); | 341 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(in
fo.GetIsolate(), "voidMethodTestInterfaceEmptyArg", "TestInterface5", 1, info.Le
ngth()), info.GetIsolate()); |
| 342 return; | 342 return; |
| 343 } | 343 } |
| 344 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; | 344 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder())
; |
| 345 TestInterfaceEmpty* testInterfaceEmptyArg; | 345 TestInterfaceEmpty* testInterfaceEmptyArg; |
| 346 { | 346 { |
| 347 if (info.Length() > 0 && !V8TestInterfaceEmpty::hasInstance(info[0], inf
o.GetIsolate())) { | 347 testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.G
etIsolate(), info[0]); |
| 348 if (!testInterfaceEmptyArg) { |
| 348 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage
s::failedToExecute("voidMethodTestInterfaceEmptyArg", "TestInterface5", "paramet
er 1 is not of type 'TestInterfaceEmpty'.")); | 349 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage
s::failedToExecute("voidMethodTestInterfaceEmptyArg", "TestInterface5", "paramet
er 1 is not of type 'TestInterfaceEmpty'.")); |
| 349 return; | 350 return; |
| 350 } | 351 } |
| 351 testInterfaceEmptyArg = V8TestInterfaceEmpty::toImpl(v8::Handle<v8::Obje
ct>::Cast(info[0])); | |
| 352 } | 352 } |
| 353 impl->voidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg); | 353 impl->voidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg); |
| 354 } | 354 } |
| 355 | 355 |
| 356 static void voidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCall
backInfo<v8::Value>& info) | 356 static void voidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCall
backInfo<v8::Value>& info) |
| 357 { | 357 { |
| 358 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); | 358 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); |
| 359 TestInterface5ImplementationV8Internal::voidMethodTestInterfaceEmptyArgMetho
d(info); | 359 TestInterface5ImplementationV8Internal::voidMethodTestInterfaceEmptyArgMetho
d(info); |
| 360 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); | 360 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); |
| 361 } | 361 } |
| (...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 878 scriptWrappable->toImpl<TestInterface5Implementation>()->ref(); | 878 scriptWrappable->toImpl<TestInterface5Implementation>()->ref(); |
| 879 } | 879 } |
| 880 | 880 |
| 881 void V8TestInterface5::derefObject(ScriptWrappable* scriptWrappable) | 881 void V8TestInterface5::derefObject(ScriptWrappable* scriptWrappable) |
| 882 { | 882 { |
| 883 scriptWrappable->toImpl<TestInterface5Implementation>()->deref(); | 883 scriptWrappable->toImpl<TestInterface5Implementation>()->deref(); |
| 884 } | 884 } |
| 885 | 885 |
| 886 } // namespace blink | 886 } // namespace blink |
| 887 #endif // ENABLE(CONDITION) | 887 #endif // ENABLE(CONDITION) |
| OLD | NEW |