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

Side by Side Diff: Source/bindings/tests/results/V8TestInterfacePython.cpp

Issue 144463014: Add [StrictTypeChecking] to the SVGGeometryElement interface (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Drop/change TC; Simplify generated code. Created 6 years, 10 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after
684 TestInterfacePythonImplementationV8Internal::TestInterfacePythonImplementati onReplaceableAttributeSetter(name, jsValue, info); 684 TestInterfacePythonImplementationV8Internal::TestInterfacePythonImplementati onReplaceableAttributeSetter(name, jsValue, info);
685 } 685 }
686 686
687 static void voidMethodTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo <v8::Value>& info) 687 static void voidMethodTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo <v8::Value>& info)
688 { 688 {
689 if (UNLIKELY(info.Length() < 1)) { 689 if (UNLIKELY(info.Length() < 1)) {
690 throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestInterfa ceEmptyArg", "TestInterfacePython", ExceptionMessages::notEnoughArguments(1, inf o.Length())), info.GetIsolate()); 690 throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestInterfa ceEmptyArg", "TestInterfacePython", ExceptionMessages::notEnoughArguments(1, inf o.Length())), info.GetIsolate());
691 return; 691 return;
692 } 692 }
693 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 693 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder());
694 if (info.Length() > 0 && !info[0]->IsUndefined() && !V8TestInterfaceEmpty::h asInstance(info[0], info.GetIsolate())) { 694 if (info.Length() > 0 && !V8TestInterfaceEmpty::hasInstance(info[0], info.Ge tIsolate())) {
695 throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestInterfa ceEmptyArg", "TestInterfacePython", "parameter 1 is not of type 'TestInterfaceEm pty'."), info.GetIsolate()); 695 throwTypeError(ExceptionMessages::failedToExecute("voidMethodTestInterfa ceEmptyArg", "TestInterfacePython", "parameter 1 is not of type 'TestInterfaceEm pty'."), info.GetIsolate());
696 return; 696 return;
697 } 697 }
698 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceE mpty::hasInstance(info[0], info.GetIsolate()) ? V8TestInterfaceEmpty::toNative(v 8::Handle<v8::Object>::Cast(info[0])) : 0); 698 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceE mpty::hasInstance(info[0], info.GetIsolate()) ? V8TestInterfaceEmpty::toNative(v 8::Handle<v8::Object>::Cast(info[0])) : 0);
699 imp->voidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg); 699 imp->voidMethodTestInterfaceEmptyArg(testInterfaceEmptyArg);
700 } 700 }
701 701
702 static void voidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCall backInfo<v8::Value>& info) 702 static void voidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCall backInfo<v8::Value>& info)
703 { 703 {
704 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 704 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
748 static void implementsComplexMethodMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info) 748 static void implementsComplexMethodMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info)
749 { 749 {
750 ExceptionState exceptionState(ExceptionState::ExecutionContext, "implementsC omplexMethod", "TestInterfacePython", info.Holder(), info.GetIsolate()); 750 ExceptionState exceptionState(ExceptionState::ExecutionContext, "implementsC omplexMethod", "TestInterfacePython", info.Holder(), info.GetIsolate());
751 if (UNLIKELY(info.Length() < 2)) { 751 if (UNLIKELY(info.Length() < 2)) {
752 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i nfo.Length())); 752 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, i nfo.Length()));
753 exceptionState.throwIfNeeded(); 753 exceptionState.throwIfNeeded();
754 return; 754 return;
755 } 755 }
756 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder()); 756 TestInterfacePythonImplementation* imp = V8TestInterfacePython::toNative(inf o.Holder());
757 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]); 757 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, strArg, info[0]);
758 if (info.Length() > 1 && !info[1]->IsUndefined() && !V8TestInterfaceEmpty::h asInstance(info[1], info.GetIsolate())) { 758 if (info.Length() > 1 && !V8TestInterfaceEmpty::hasInstance(info[1], info.Ge tIsolate())) {
759 exceptionState.throwTypeError("parameter 2 is not of type 'TestInterface Empty'."); 759 exceptionState.throwTypeError("parameter 2 is not of type 'TestInterface Empty'.");
760 exceptionState.throwIfNeeded(); 760 exceptionState.throwIfNeeded();
761 return; 761 return;
762 } 762 }
763 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceE mpty::hasInstance(info[1], info.GetIsolate()) ? V8TestInterfaceEmpty::toNative(v 8::Handle<v8::Object>::Cast(info[1])) : 0); 763 V8TRYCATCH_VOID(TestInterfaceEmpty*, testInterfaceEmptyArg, V8TestInterfaceE mpty::hasInstance(info[1], info.GetIsolate()) ? V8TestInterfaceEmpty::toNative(v 8::Handle<v8::Object>::Cast(info[1])) : 0);
764 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate()) ; 764 ExecutionContext* scriptContext = currentExecutionContext(info.GetIsolate()) ;
765 RefPtr<TestInterfaceEmpty> result = TestImplements::implementsComplexMethod( scriptContext, imp, strArg, testInterfaceEmptyArg, exceptionState); 765 RefPtr<TestInterfaceEmpty> result = TestImplements::implementsComplexMethod( scriptContext, imp, strArg, testInterfaceEmptyArg, exceptionState);
766 if (exceptionState.throwIfNeeded()) 766 if (exceptionState.throwIfNeeded())
767 return; 767 return;
768 v8SetReturnValue(info, result.release()); 768 v8SetReturnValue(info, result.release());
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
1105 fromInternalPointer(object)->deref(); 1105 fromInternalPointer(object)->deref();
1106 } 1106 }
1107 template<> 1107 template<>
1108 v8::Handle<v8::Value> toV8NoInline(TestInterfacePythonImplementation* impl, v8:: Handle<v8::Object> creationContext, v8::Isolate* isolate) 1108 v8::Handle<v8::Value> toV8NoInline(TestInterfacePythonImplementation* impl, v8:: Handle<v8::Object> creationContext, v8::Isolate* isolate)
1109 { 1109 {
1110 return toV8(impl, creationContext, isolate); 1110 return toV8(impl, creationContext, isolate);
1111 } 1111 }
1112 1112
1113 } // namespace WebCore 1113 } // namespace WebCore
1114 #endif // ENABLE(CONDITION) 1114 #endif // ENABLE(CONDITION)
OLDNEW
« no previous file with comments | « Source/bindings/templates/methods.cpp ('k') | Source/bindings/tests/results/V8TestObjectPython.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698