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

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

Issue 474813004: IDL: Fix overload resolution for dictionary types (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: the fix Created 6 years, 4 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/idls/TestObject.idl ('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 #include "V8TestObject.h" 8 #include "V8TestObject.h"
9 9
10 #include "bindings/core/v8/BindingSecurity.h" 10 #include "bindings/core/v8/BindingSecurity.h"
(...skipping 21 matching lines...) Expand all
32 #include "bindings/tests/v8/V8Document.h" 32 #include "bindings/tests/v8/V8Document.h"
33 #include "bindings/tests/v8/V8DocumentFragment.h" 33 #include "bindings/tests/v8/V8DocumentFragment.h"
34 #include "bindings/tests/v8/V8DocumentType.h" 34 #include "bindings/tests/v8/V8DocumentType.h"
35 #include "bindings/tests/v8/V8Element.h" 35 #include "bindings/tests/v8/V8Element.h"
36 #include "bindings/tests/v8/V8EventTarget.h" 36 #include "bindings/tests/v8/V8EventTarget.h"
37 #include "bindings/tests/v8/V8HTMLElement.h" 37 #include "bindings/tests/v8/V8HTMLElement.h"
38 #include "bindings/tests/v8/V8Node.h" 38 #include "bindings/tests/v8/V8Node.h"
39 #include "bindings/tests/v8/V8NodeFilter.h" 39 #include "bindings/tests/v8/V8NodeFilter.h"
40 #include "bindings/tests/v8/V8ShadowRoot.h" 40 #include "bindings/tests/v8/V8ShadowRoot.h"
41 #include "bindings/tests/v8/V8TestCallbackInterface.h" 41 #include "bindings/tests/v8/V8TestCallbackInterface.h"
42 #include "bindings/tests/v8/V8TestDictionary.h"
42 #include "bindings/tests/v8/V8TestInterface.h" 43 #include "bindings/tests/v8/V8TestInterface.h"
43 #include "bindings/tests/v8/V8TestInterfaceEmpty.h" 44 #include "bindings/tests/v8/V8TestInterfaceEmpty.h"
44 #include "bindings/tests/v8/V8TestInterfaceGarbageCollected.h" 45 #include "bindings/tests/v8/V8TestInterfaceGarbageCollected.h"
45 #include "bindings/tests/v8/V8TestInterfaceWillBeGarbageCollected.h" 46 #include "bindings/tests/v8/V8TestInterfaceWillBeGarbageCollected.h"
46 #include "bindings/tests/v8/V8TestNode.h" 47 #include "bindings/tests/v8/V8TestNode.h"
47 #include "bindings/tests/v8/V8TestObject.h" 48 #include "bindings/tests/v8/V8TestObject.h"
48 #include "bindings/tests/v8/V8Window.h" 49 #include "bindings/tests/v8/V8Window.h"
49 #include "bindings/tests/v8/V8XPathNSResolver.h" 50 #include "bindings/tests/v8/V8XPathNSResolver.h"
50 #include "core/HTMLNames.h" 51 #include "core/HTMLNames.h"
51 #include "core/css/MediaQueryListListener.h" 52 #include "core/css/MediaQueryListListener.h"
(...skipping 8112 matching lines...) Expand 10 before | Expand all | Expand 10 after
8164 exceptionState.throwIfNeeded(); 8165 exceptionState.throwIfNeeded();
8165 } 8166 }
8166 8167
8167 static void overloadedMethodIMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info) 8168 static void overloadedMethodIMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info)
8168 { 8169 {
8169 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 8170 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
8170 TestObjectV8Internal::overloadedMethodIMethod(info); 8171 TestObjectV8Internal::overloadedMethodIMethod(info);
8171 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 8172 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
8172 } 8173 }
8173 8174
8175 static void overloadedMethodJ1Method(const v8::FunctionCallbackInfo<v8::Value>& info)
8176 {
8177 TestObject* impl = V8TestObject::toNative(info.Holder());
8178 V8StringResource<> stringArg;
8179 {
8180 TOSTRING_VOID_INTERNAL(stringArg, info[0]);
8181 }
8182 impl->overloadedMethodJ(stringArg);
8183 }
8184
8185 static void overloadedMethodJ2Method(const v8::FunctionCallbackInfo<v8::Value>& info)
8186 {
8187 TestObject* impl = V8TestObject::toNative(info.Holder());
8188 TestDictionary* testDictionaryArg;
8189 {
8190 v8::TryCatch block;
8191 V8RethrowTryCatchScope rethrow(block);
8192 TONATIVE_VOID_INTERNAL(testDictionaryArg, V8TestDictionary::toNative(inf o.GetIsolate(), info[0]));
8193 }
8194 impl->overloadedMethodJ(testDictionaryArg);
8195 }
8196
8197 static void overloadedMethodJMethod(const v8::FunctionCallbackInfo<v8::Value>& i nfo)
8198 {
8199 ExceptionState exceptionState(ExceptionState::ExecutionContext, "overloadedM ethodJ", "TestObject", info.Holder(), info.GetIsolate());
8200 switch (std::min(1, info.Length())) {
8201 case 1:
8202 if (info[0]->IsObject()) {
8203 overloadedMethodJ2Method(info);
8204 return;
8205 }
8206 if (true) {
8207 overloadedMethodJ1Method(info);
8208 return;
8209 }
8210 break;
8211 default:
8212 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
8213 exceptionState.throwIfNeeded();
8214 return;
8215 }
8216 exceptionState.throwTypeError("No function was found that matched the signat ure provided.");
8217 exceptionState.throwIfNeeded();
8218 }
8219
8220 static void overloadedMethodJMethodCallback(const v8::FunctionCallbackInfo<v8::V alue>& info)
8221 {
8222 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
8223 TestObjectV8Internal::overloadedMethodJMethod(info);
8224 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
8225 }
8226
8174 static void overloadedPerWorldBindingsMethod1Method(const v8::FunctionCallbackIn fo<v8::Value>& info) 8227 static void overloadedPerWorldBindingsMethod1Method(const v8::FunctionCallbackIn fo<v8::Value>& info)
8175 { 8228 {
8176 TestObject* impl = V8TestObject::toNative(info.Holder()); 8229 TestObject* impl = V8TestObject::toNative(info.Holder());
8177 impl->overloadedPerWorldBindingsMethod(); 8230 impl->overloadedPerWorldBindingsMethod();
8178 } 8231 }
8179 8232
8180 static void overloadedPerWorldBindingsMethod1MethodForMainWorld(const v8::Functi onCallbackInfo<v8::Value>& info) 8233 static void overloadedPerWorldBindingsMethod1MethodForMainWorld(const v8::Functi onCallbackInfo<v8::Value>& info)
8181 { 8234 {
8182 TestObject* impl = V8TestObject::toNative(info.Holder()); 8235 TestObject* impl = V8TestObject::toNative(info.Holder());
8183 impl->overloadedPerWorldBindingsMethod(); 8236 impl->overloadedPerWorldBindingsMethod();
(...skipping 2283 matching lines...) Expand 10 before | Expand all | Expand 10 after
10467 {"voidMethodVariadicTestInterfaceWillBeGarbageCollectedArg", TestObjectV8Int ernal::voidMethodVariadicTestInterfaceWillBeGarbageCollectedArgMethodCallback, 0 , 0, V8DOMConfiguration::ExposedToAllScripts}, 10520 {"voidMethodVariadicTestInterfaceWillBeGarbageCollectedArg", TestObjectV8Int ernal::voidMethodVariadicTestInterfaceWillBeGarbageCollectedArgMethodCallback, 0 , 0, V8DOMConfiguration::ExposedToAllScripts},
10468 {"overloadedMethodA", TestObjectV8Internal::overloadedMethodAMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, 10521 {"overloadedMethodA", TestObjectV8Internal::overloadedMethodAMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts},
10469 {"overloadedMethodB", TestObjectV8Internal::overloadedMethodBMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, 10522 {"overloadedMethodB", TestObjectV8Internal::overloadedMethodBMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts},
10470 {"overloadedMethodC", TestObjectV8Internal::overloadedMethodCMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, 10523 {"overloadedMethodC", TestObjectV8Internal::overloadedMethodCMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts},
10471 {"overloadedMethodD", TestObjectV8Internal::overloadedMethodDMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, 10524 {"overloadedMethodD", TestObjectV8Internal::overloadedMethodDMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts},
10472 {"overloadedMethodE", TestObjectV8Internal::overloadedMethodEMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, 10525 {"overloadedMethodE", TestObjectV8Internal::overloadedMethodEMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts},
10473 {"overloadedMethodF", TestObjectV8Internal::overloadedMethodFMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, 10526 {"overloadedMethodF", TestObjectV8Internal::overloadedMethodFMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
10474 {"overloadedMethodG", TestObjectV8Internal::overloadedMethodGMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, 10527 {"overloadedMethodG", TestObjectV8Internal::overloadedMethodGMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
10475 {"overloadedMethodH", TestObjectV8Internal::overloadedMethodHMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, 10528 {"overloadedMethodH", TestObjectV8Internal::overloadedMethodHMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts},
10476 {"overloadedMethodI", TestObjectV8Internal::overloadedMethodIMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, 10529 {"overloadedMethodI", TestObjectV8Internal::overloadedMethodIMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts},
10530 {"overloadedMethodJ", TestObjectV8Internal::overloadedMethodJMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts},
10477 {"overloadedPerWorldBindingsMethod", TestObjectV8Internal::overloadedPerWorl dBindingsMethodMethodCallback, TestObjectV8Internal::overloadedPerWorldBindingsM ethodMethodCallbackForMainWorld, 0, V8DOMConfiguration::ExposedToAllScripts}, 10531 {"overloadedPerWorldBindingsMethod", TestObjectV8Internal::overloadedPerWorl dBindingsMethodMethodCallback, TestObjectV8Internal::overloadedPerWorldBindingsM ethodMethodCallbackForMainWorld, 0, V8DOMConfiguration::ExposedToAllScripts},
10478 {"voidMethodClampUnsignedShortArg", TestObjectV8Internal::voidMethodClampUns ignedShortArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, 10532 {"voidMethodClampUnsignedShortArg", TestObjectV8Internal::voidMethodClampUns ignedShortArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts},
10479 {"voidMethodClampUnsignedLongArg", TestObjectV8Internal::voidMethodClampUnsi gnedLongArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, 10533 {"voidMethodClampUnsignedLongArg", TestObjectV8Internal::voidMethodClampUnsi gnedLongArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts},
10480 {"voidMethodDefaultUndefinedTestInterfaceEmptyArg", TestObjectV8Internal::vo idMethodDefaultUndefinedTestInterfaceEmptyArgMethodCallback, 0, 0, V8DOMConfigur ation::ExposedToAllScripts}, 10534 {"voidMethodDefaultUndefinedTestInterfaceEmptyArg", TestObjectV8Internal::vo idMethodDefaultUndefinedTestInterfaceEmptyArgMethodCallback, 0, 0, V8DOMConfigur ation::ExposedToAllScripts},
10481 {"voidMethodDefaultUndefinedLongArg", TestObjectV8Internal::voidMethodDefaul tUndefinedLongArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts}, 10535 {"voidMethodDefaultUndefinedLongArg", TestObjectV8Internal::voidMethodDefaul tUndefinedLongArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScripts},
10482 {"voidMethodDefaultUndefinedStringArg", TestObjectV8Internal::voidMethodDefa ultUndefinedStringArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScrip ts}, 10536 {"voidMethodDefaultUndefinedStringArg", TestObjectV8Internal::voidMethodDefa ultUndefinedStringArgMethodCallback, 0, 0, V8DOMConfiguration::ExposedToAllScrip ts},
10483 {"voidMethodEnforceRangeLongArg", TestObjectV8Internal::voidMethodEnforceRan geLongArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, 10537 {"voidMethodEnforceRangeLongArg", TestObjectV8Internal::voidMethodEnforceRan geLongArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts},
10484 {"voidMethodTreatNullAsEmptyStringStringArg", TestObjectV8Internal::voidMeth odTreatNullAsEmptyStringStringArgMethodCallback, 0, 1, V8DOMConfiguration::Expos edToAllScripts}, 10538 {"voidMethodTreatNullAsEmptyStringStringArg", TestObjectV8Internal::voidMeth odTreatNullAsEmptyStringStringArgMethodCallback, 0, 1, V8DOMConfiguration::Expos edToAllScripts},
10485 {"voidMethodTreatNullAsNullStringStringArg", TestObjectV8Internal::voidMetho dTreatNullAsNullStringStringArgMethodCallback, 0, 1, V8DOMConfiguration::Exposed ToAllScripts}, 10539 {"voidMethodTreatNullAsNullStringStringArg", TestObjectV8Internal::voidMetho dTreatNullAsNullStringStringArgMethodCallback, 0, 1, V8DOMConfiguration::Exposed ToAllScripts},
10486 {"voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArg", TestO bjectV8Internal::voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringString ArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts}, 10540 {"voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringStringArg", TestO bjectV8Internal::voidMethodTreatNullAsNullStringTreatUndefinedAsNullStringString ArgMethodCallback, 0, 1, V8DOMConfiguration::ExposedToAllScripts},
(...skipping 797 matching lines...) Expand 10 before | Expand all | Expand 10 after
11284 // FIXME: We should support more exceptions. 11338 // FIXME: We should support more exceptions.
11285 RELEASE_ASSERT_NOT_REACHED(); 11339 RELEASE_ASSERT_NOT_REACHED();
11286 } 11340 }
11287 block.ReThrow(); 11341 block.ReThrow();
11288 return false; 11342 return false;
11289 } 11343 }
11290 return true; 11344 return true;
11291 } 11345 }
11292 11346
11293 } // namespace blink 11347 } // namespace blink
OLDNEW
« no previous file with comments | « Source/bindings/tests/idls/TestObject.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698