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

Side by Side Diff: Source/bindings/tests/results/core/V8TestInterface.cpp

Issue 810563007: IDL: Add missing type-check for callback function arguments (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 11 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
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 "V8TestInterface.h" 9 #include "V8TestInterface.h"
10 10
(...skipping 1522 matching lines...) Expand 10 before | Expand all | Expand 10 after
1533 #if ENABLE(PARTIAL_CONDITION) 1533 #if ENABLE(PARTIAL_CONDITION)
1534 static void partialVoidMethodPartialCallbackTypeArgMethod(const v8::FunctionCall backInfo<v8::Value>& info) 1534 static void partialVoidMethodPartialCallbackTypeArgMethod(const v8::FunctionCall backInfo<v8::Value>& info)
1535 { 1535 {
1536 if (UNLIKELY(info.Length() < 1)) { 1536 if (UNLIKELY(info.Length() < 1)) {
1537 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(in fo.GetIsolate(), "partialVoidMethodPartialCallbackTypeArg", "TestInterface", 1, info.Length()), info.GetIsolate()); 1537 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod(in fo.GetIsolate(), "partialVoidMethodPartialCallbackTypeArg", "TestInterface", 1, info.Length()), info.GetIsolate());
1538 return; 1538 return;
1539 } 1539 }
1540 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); 1540 TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
1541 ScriptValue partialCallbackTypeArg; 1541 ScriptValue partialCallbackTypeArg;
1542 { 1542 {
1543 if (!info[0]->IsFunction()) {
1544 V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessage s::failedToExecute("partialVoidMethodPartialCallbackTypeArg", "TestInterface", " The callback provided as parameter 1 is not a function."));
1545 return;
1546 }
1543 partialCallbackTypeArg = ScriptValue(ScriptState::current(info.GetIsolat e()), info[0]); 1547 partialCallbackTypeArg = ScriptValue(ScriptState::current(info.GetIsolat e()), info[0]);
1544 } 1548 }
1545 TestPartialInterface::partialVoidMethodPartialCallbackTypeArg(*impl, partial CallbackTypeArg); 1549 TestPartialInterface::partialVoidMethodPartialCallbackTypeArg(*impl, partial CallbackTypeArg);
1546 } 1550 }
1547 #endif // ENABLE(PARTIAL_CONDITION) 1551 #endif // ENABLE(PARTIAL_CONDITION)
1548 1552
1549 #if ENABLE(PARTIAL_CONDITION) 1553 #if ENABLE(PARTIAL_CONDITION)
1550 static void partialVoidMethodPartialCallbackTypeArgMethodCallback(const v8::Func tionCallbackInfo<v8::Value>& info) 1554 static void partialVoidMethodPartialCallbackTypeArgMethodCallback(const v8::Func tionCallbackInfo<v8::Value>& info)
1551 { 1555 {
1552 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 1556 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
(...skipping 821 matching lines...) Expand 10 before | Expand all | Expand 10 after
2374 void V8TestInterface::registerPartial2VoidMethodMethodForPartialInterface(void ( *method)(const v8::FunctionCallbackInfo<v8::Value>&)) 2378 void V8TestInterface::registerPartial2VoidMethodMethodForPartialInterface(void ( *method)(const v8::FunctionCallbackInfo<v8::Value>&))
2375 { 2379 {
2376 TestInterfaceImplementationV8Internal::partial2VoidMethodMethodForPartialInt erface = method; 2380 TestInterfaceImplementationV8Internal::partial2VoidMethodMethodForPartialInt erface = method;
2377 } 2381 }
2378 void V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface( void (*method)(const v8::FunctionCallbackInfo<v8::Value>&)) 2382 void V8TestInterface::registerPartial2StaticVoidMethodMethodForPartialInterface( void (*method)(const v8::FunctionCallbackInfo<v8::Value>&))
2379 { 2383 {
2380 TestInterfaceImplementationV8Internal::partial2StaticVoidMethodMethodForPart ialInterface = method; 2384 TestInterfaceImplementationV8Internal::partial2StaticVoidMethodMethodForPart ialInterface = method;
2381 } 2385 }
2382 } // namespace blink 2386 } // namespace blink
2383 #endif // ENABLE(CONDITION) 2387 #endif // ENABLE(CONDITION)
OLDNEW
« no previous file with comments | « Source/bindings/tests/idls/core/TestObject.idl ('k') | Source/bindings/tests/results/core/V8TestObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698