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

Side by Side Diff: Source/bindings/tests/results/V8Float64Array.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 "V8Float64Array.h" 22 #include "V8Float64Array.h"
23 23
24 #include "RuntimeEnabledFeatures.h" 24 #include "RuntimeEnabledFeatures.h"
25 #include "V8ArrayBufferView.h" 25 #include "V8ArrayBufferView.h"
26 #include "bindings/v8/ExceptionMessages.h"
26 #include "bindings/v8/ExceptionState.h" 27 #include "bindings/v8/ExceptionState.h"
27 #include "bindings/v8/ScriptController.h" 28 #include "bindings/v8/ScriptController.h"
28 #include "bindings/v8/V8Binding.h" 29 #include "bindings/v8/V8Binding.h"
29 #include "bindings/v8/V8DOMConfiguration.h" 30 #include "bindings/v8/V8DOMConfiguration.h"
30 #include "bindings/v8/V8DOMWrapper.h" 31 #include "bindings/v8/V8DOMWrapper.h"
31 #include "bindings/v8/V8ObjectConstructor.h" 32 #include "bindings/v8/V8ObjectConstructor.h"
32 #include "bindings/v8/custom/V8ArrayBufferCustom.h" 33 #include "bindings/v8/custom/V8ArrayBufferCustom.h"
33 #include "bindings/v8/custom/V8ArrayBufferViewCustom.h" 34 #include "bindings/v8/custom/V8ArrayBufferViewCustom.h"
34 #include "bindings/v8/custom/V8Float32ArrayCustom.h" 35 #include "bindings/v8/custom/V8Float32ArrayCustom.h"
35 #include "bindings/v8/custom/V8Float64ArrayCustom.h" 36 #include "bindings/v8/custom/V8Float64ArrayCustom.h"
(...skipping 29 matching lines...) Expand all
65 namespace WebCore { 66 namespace WebCore {
66 WrapperTypeInfo V8Float64Array::info = { V8Float64Array::GetTemplate, V8Float64A rray::derefObject, 0, 0, 0, V8Float64Array::installPerContextPrototypeProperties , &V8ArrayBufferView::info, WrapperTypeObjectPrototype }; 67 WrapperTypeInfo V8Float64Array::info = { V8Float64Array::GetTemplate, V8Float64A rray::derefObject, 0, 0, 0, V8Float64Array::installPerContextPrototypeProperties , &V8ArrayBufferView::info, WrapperTypeObjectPrototype };
67 68
68 namespace Float64ArrayV8Internal { 69 namespace Float64ArrayV8Internal {
69 70
70 template <typename T> void V8_USE(T) { } 71 template <typename T> void V8_USE(T) { }
71 72
72 static void fooMethod(const v8::FunctionCallbackInfo<v8::Value>& args) 73 static void fooMethod(const v8::FunctionCallbackInfo<v8::Value>& args)
73 { 74 {
74 if (UNLIKELY(args.Length() < 1)) { 75 if (UNLIKELY(args.Length() < 1)) {
75 throwNotEnoughArgumentsError(args.GetIsolate()); 76 throwTypeError(ExceptionMessages::failedToExecute("foo", "Float64Array", ExceptionMessages::notEnoughArguments(1, args.Length())), args.GetIsolate());
76 return; 77 return;
77 } 78 }
78 Float64Array* imp = V8Float64Array::toNative(args.Holder()); 79 Float64Array* imp = V8Float64Array::toNative(args.Holder());
79 V8TRYCATCH_VOID(Float32Array*, array, args[0]->IsFloat32Array() ? V8Float32A rray::toNative(v8::Handle<v8::Float32Array>::Cast(args[0])) : 0); 80 V8TRYCATCH_VOID(Float32Array*, array, args[0]->IsFloat32Array() ? V8Float32A rray::toNative(v8::Handle<v8::Float32Array>::Cast(args[0])) : 0);
80 v8SetReturnValue(args, imp->foo(array), args.Holder()); 81 v8SetReturnValue(args, imp->foo(array), args.Holder());
81 return; 82 return;
82 } 83 }
83 84
84 static void fooMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args) 85 static void fooMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& args)
85 { 86 {
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 V8DOMWrapper::associateObjectWithWrapper<V8Float64Array>(impl, &info, wrappe r, isolate, WrapperConfiguration::Independent); 224 V8DOMWrapper::associateObjectWithWrapper<V8Float64Array>(impl, &info, wrappe r, isolate, WrapperConfiguration::Independent);
224 return wrapper; 225 return wrapper;
225 } 226 }
226 227
227 void V8Float64Array::derefObject(void* object) 228 void V8Float64Array::derefObject(void* object)
228 { 229 {
229 fromInternalPointer(object)->deref(); 230 fromInternalPointer(object)->deref();
230 } 231 }
231 232
232 } // namespace WebCore 233 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/scripts/deprecated_code_generator_v8.pm ('k') | Source/bindings/tests/results/V8TestActiveDOMObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698