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

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

Issue 24203002: Improve generated "Not enough arguments." TypeError exceptions. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: NeedsRebaseline Created 7 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 This file is part of the Blink open source project. 2 This file is part of the Blink open source project.
3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY! 3 This file has been auto-generated by CodeGeneratorV8.pm. DO NOT MODIFY!
4 4
5 This library is free software; you can redistribute it and/or 5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public 6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either 7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version. 8 version 2 of the License, or (at your option) any later version.
9 9
10 This library is distributed in the hope that it will be useful, 10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details. 13 Library General Public License for more details.
14 14
15 You should have received a copy of the GNU Library General Public License 15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to 16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA. 18 Boston, MA 02111-1307, USA.
19 */ 19 */
20 20
21 #include "config.h" 21 #include "config.h"
22 #include "V8TestEventTarget.h" 22 #include "V8TestEventTarget.h"
23 23
24 #include "RuntimeEnabledFeatures.h" 24 #include "RuntimeEnabledFeatures.h"
25 #include "V8EventTarget.h" 25 #include "V8EventTarget.h"
26 #include "V8Node.h" 26 #include "V8Node.h"
27 #include "bindings/v8/ExceptionMessages.h"
27 #include "bindings/v8/ExceptionState.h" 28 #include "bindings/v8/ExceptionState.h"
28 #include "bindings/v8/ScriptController.h" 29 #include "bindings/v8/ScriptController.h"
29 #include "bindings/v8/V8Binding.h" 30 #include "bindings/v8/V8Binding.h"
30 #include "bindings/v8/V8DOMConfiguration.h" 31 #include "bindings/v8/V8DOMConfiguration.h"
31 #include "bindings/v8/V8DOMWrapper.h" 32 #include "bindings/v8/V8DOMWrapper.h"
32 #include "core/dom/ContextFeatures.h" 33 #include "core/dom/ContextFeatures.h"
33 #include "core/dom/Document.h" 34 #include "core/dom/Document.h"
34 #include "core/platform/chromium/TraceEvent.h" 35 #include "core/platform/chromium/TraceEvent.h"
35 #include "wtf/GetPtr.h" 36 #include "wtf/GetPtr.h"
36 #include "wtf/RefPtr.h" 37 #include "wtf/RefPtr.h"
(...skipping 23 matching lines...) Expand all
60 namespace WebCore { 61 namespace WebCore {
61 WrapperTypeInfo V8TestEventTarget::info = { V8TestEventTarget::GetTemplate, V8Te stEventTarget::derefObject, 0, V8TestEventTarget::toEventTarget, 0, V8TestEventT arget::installPerContextPrototypeProperties, &V8EventTarget::info, WrapperTypeOb jectPrototype }; 62 WrapperTypeInfo V8TestEventTarget::info = { V8TestEventTarget::GetTemplate, V8Te stEventTarget::derefObject, 0, V8TestEventTarget::toEventTarget, 0, V8TestEventT arget::installPerContextPrototypeProperties, &V8EventTarget::info, WrapperTypeOb jectPrototype };
62 63
63 namespace TestEventTargetV8Internal { 64 namespace TestEventTargetV8Internal {
64 65
65 template <typename T> void V8_USE(T) { } 66 template <typename T> void V8_USE(T) { }
66 67
67 static void itemMethod(const v8::FunctionCallbackInfo<v8::Value>& args) 68 static void itemMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
68 { 69 {
69 if (UNLIKELY(args.Length() < 1)) { 70 if (UNLIKELY(args.Length() < 1)) {
70 throwNotEnoughArgumentsError(args.GetIsolate()); 71 throwTypeError(ExceptionMessages::failedToExecute("item", "TestEventTarg et", ExceptionMessages::notEnoughArguments(1, args.Length())), args.GetIsolate() );
71 return; 72 return;
72 } 73 }
73 TestEventTarget* imp = V8TestEventTarget::toNative(args.Holder()); 74 TestEventTarget* imp = V8TestEventTarget::toNative(args.Holder());
74 V8TRYCATCH_VOID(unsigned, index, toUInt32(args[0])); 75 V8TRYCATCH_VOID(unsigned, index, toUInt32(args[0]));
75 v8SetReturnValue(args, imp->item(index), args.Holder()); 76 v8SetReturnValue(args, imp->item(index), args.Holder());
76 return; 77 return;
77 } 78 }
78 79
79 static void itemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args) 80 static void itemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
80 { 81 {
81 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 82 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
82 TestEventTargetV8Internal::itemMethod(args); 83 TestEventTargetV8Internal::itemMethod(args);
83 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution"); 84 TRACE_EVENT_SET_SAMPLING_STATE("V8", "Execution");
84 } 85 }
85 86
86 static void namedItemMethod(const v8::FunctionCallbackInfo<v8::Value>& args) 87 static void namedItemMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
87 { 88 {
88 if (UNLIKELY(args.Length() < 1)) { 89 if (UNLIKELY(args.Length() < 1)) {
89 throwNotEnoughArgumentsError(args.GetIsolate()); 90 throwTypeError(ExceptionMessages::failedToExecute("namedItem", "TestEven tTarget", ExceptionMessages::notEnoughArguments(1, args.Length())), args.GetIsol ate());
90 return; 91 return;
91 } 92 }
92 TestEventTarget* imp = V8TestEventTarget::toNative(args.Holder()); 93 TestEventTarget* imp = V8TestEventTarget::toNative(args.Holder());
93 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, name, args[0]); 94 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, name, args[0]);
94 v8SetReturnValue(args, imp->namedItem(name), args.Holder()); 95 v8SetReturnValue(args, imp->namedItem(name), args.Holder());
95 return; 96 return;
96 } 97 }
97 98
98 static void namedItemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& a rgs) 99 static void namedItemMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& a rgs)
99 { 100 {
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 V8DOMWrapper::associateObjectWithWrapper<V8TestEventTarget>(impl, &info, wra pper, isolate, WrapperConfiguration::Independent); 343 V8DOMWrapper::associateObjectWithWrapper<V8TestEventTarget>(impl, &info, wra pper, isolate, WrapperConfiguration::Independent);
343 return wrapper; 344 return wrapper;
344 } 345 }
345 346
346 void V8TestEventTarget::derefObject(void* object) 347 void V8TestEventTarget::derefObject(void* object)
347 { 348 {
348 fromInternalPointer(object)->deref(); 349 fromInternalPointer(object)->deref();
349 } 350 }
350 351
351 } // namespace WebCore 352 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestEventConstructor.cpp ('k') | Source/bindings/tests/results/V8TestExtendedEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698