Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(750)

Side by Side Diff: Source/bindings/tests/results/modules/V8TestInterface5.cpp

Issue 564063002: Generate simple code for "trivial" conversions (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebased Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/bindings/tests/results/core/V8TestSpecialOperations.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 static void testInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 53 static void testInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
54 { 54 {
55 v8::Handle<v8::Object> holder = info.Holder(); 55 v8::Handle<v8::Object> holder = info.Holder();
56 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceA ttribute", "TestInterface5", holder, info.GetIsolate()); 56 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceA ttribute", "TestInterface5", holder, info.GetIsolate());
57 if (!V8TestInterface5::hasInstance(v8Value, info.GetIsolate())) { 57 if (!V8TestInterface5::hasInstance(v8Value, info.GetIsolate())) {
58 exceptionState.throwTypeError("The provided value is not of type 'TestIn terface5'."); 58 exceptionState.throwTypeError("The provided value is not of type 'TestIn terface5'.");
59 exceptionState.throwIfNeeded(); 59 exceptionState.throwIfNeeded();
60 return; 60 return;
61 } 61 }
62 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); 62 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
63 TONATIVE_VOID(TestInterface5Implementation*, cppValue, V8TestInterface5::toI mplWithTypeCheck(info.GetIsolate(), v8Value)); 63 TestInterface5Implementation* cppValue = V8TestInterface5::toImplWithTypeChe ck(info.GetIsolate(), v8Value);
64 impl->setTestInterfaceAttribute(WTF::getPtr(cppValue)); 64 impl->setTestInterfaceAttribute(WTF::getPtr(cppValue));
65 } 65 }
66 66
67 static void testInterfaceAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 67 static void testInterfaceAttributeAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
68 { 68 {
69 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 69 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
70 TestInterface5ImplementationV8Internal::testInterfaceAttributeAttributeSette r(v8Value, info); 70 TestInterface5ImplementationV8Internal::testInterfaceAttributeAttributeSette r(v8Value, info);
71 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 71 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
72 } 72 }
73 73
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 339
340 static void voidMethodTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo <v8::Value>& info) 340 static void voidMethodTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo <v8::Value>& info)
341 { 341 {
342 if (UNLIKELY(info.Length() < 1)) { 342 if (UNLIKELY(info.Length() < 1)) {
343 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v oidMethodTestInterfaceEmptyArg", "TestInterface5", 1, info.Length(), info.GetIso late()), info.GetIsolate()); 343 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v oidMethodTestInterfaceEmptyArg", "TestInterface5", 1, info.Length(), info.GetIso late()), info.GetIsolate());
344 return; 344 return;
345 } 345 }
346 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ; 346 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ;
347 TestInterfaceEmpty* testInterfaceEmptyArg; 347 TestInterfaceEmpty* testInterfaceEmptyArg;
348 { 348 {
349 v8::TryCatch block;
350 V8RethrowTryCatchScope rethrow(block);
351 if (info.Length() > 0 && !V8TestInterfaceEmpty::hasInstance(info[0], inf o.GetIsolate())) { 349 if (info.Length() > 0 && !V8TestInterfaceEmpty::hasInstance(info[0], inf o.GetIsolate())) {
352 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute( "voidMethodTestInterfaceEmptyArg", "TestInterface5", "parameter 1 is not of type 'TestInterfaceEmpty'."), info.GetIsolate()); 350 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute( "voidMethodTestInterfaceEmptyArg", "TestInterface5", "parameter 1 is not of type 'TestInterfaceEmpty'."), info.GetIsolate());
353 return; 351 return;
354 } 352 }
355 TONATIVE_VOID_INTERNAL(testInterfaceEmptyArg, V8TestInterfaceEmpty::toIm plWithTypeCheck(info.GetIsolate(), info[0])); 353 testInterfaceEmptyArg = V8TestInterfaceEmpty::toImplWithTypeCheck(info.G etIsolate(), info[0]);
356 } 354 }
357 impl->voidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg); 355 impl->voidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg);
358 } 356 }
359 357
360 static void voidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCall backInfo<v8::Value>& info) 358 static void voidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCall backInfo<v8::Value>& info)
361 { 359 {
362 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 360 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
363 TestInterface5ImplementationV8Internal::voidMethodTestInterfaceEmptyArgMetho d(info); 361 TestInterface5ImplementationV8Internal::voidMethodTestInterfaceEmptyArgMetho d(info);
364 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 362 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
365 } 363 }
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after
878 } 876 }
879 877
880 template<> 878 template<>
881 v8::Handle<v8::Value> toV8NoInline(TestInterface5Implementation* impl, v8::Handl e<v8::Object> creationContext, v8::Isolate* isolate) 879 v8::Handle<v8::Value> toV8NoInline(TestInterface5Implementation* impl, v8::Handl e<v8::Object> creationContext, v8::Isolate* isolate)
882 { 880 {
883 return toV8(impl, creationContext, isolate); 881 return toV8(impl, creationContext, isolate);
884 } 882 }
885 883
886 } // namespace blink 884 } // namespace blink
887 #endif // ENABLE(CONDITION) 885 #endif // ENABLE(CONDITION)
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/core/V8TestSpecialOperations.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698