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

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

Issue 284163002: Better arity checks for overloads (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Return properly Created 6 years, 7 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 // 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 "V8TestInterfaceConstructor.h" 8 #include "V8TestInterfaceConstructor.h"
9 9
10 #include "RuntimeEnabledFeatures.h" 10 #include "RuntimeEnabledFeatures.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 TestInterfaceConstructorV8Internal::constructor2(info); 116 TestInterfaceConstructorV8Internal::constructor2(info);
117 return; 117 return;
118 } 118 }
119 break; 119 break;
120 case 8: 120 case 8:
121 if (true) { 121 if (true) {
122 TestInterfaceConstructorV8Internal::constructor2(info); 122 TestInterfaceConstructorV8Internal::constructor2(info);
123 return; 123 return;
124 } 124 }
125 break; 125 break;
126 default:
127 if (info.Length() >= 0) {
128 throwArityTypeError(exceptionState, "[0, 6, 7, 8]", info.Length());
129 return;
130 }
131 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(0, i nfo.Length()));
132 exceptionState.throwIfNeeded();
133 return;
126 } 134 }
127 exceptionState.throwTypeError("No matching constructor signature."); 135 exceptionState.throwTypeError("No matching constructor signature.");
128 exceptionState.throwIfNeeded(); 136 exceptionState.throwIfNeeded();
129 } 137 }
130 138
131 } // namespace TestInterfaceConstructorV8Internal 139 } // namespace TestInterfaceConstructorV8Internal
132 140
133 void V8TestInterfaceConstructor::constructorCallback(const v8::FunctionCallbackI nfo<v8::Value>& info) 141 void V8TestInterfaceConstructor::constructorCallback(const v8::FunctionCallbackI nfo<v8::Value>& info)
134 { 142 {
135 TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "DOMConstructor"); 143 TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "DOMConstructor");
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 fromInternalPointer(object)->deref(); 228 fromInternalPointer(object)->deref();
221 } 229 }
222 230
223 template<> 231 template<>
224 v8::Handle<v8::Value> toV8NoInline(TestInterfaceConstructor* impl, v8::Handle<v8 ::Object> creationContext, v8::Isolate* isolate) 232 v8::Handle<v8::Value> toV8NoInline(TestInterfaceConstructor* impl, v8::Handle<v8 ::Object> creationContext, v8::Isolate* isolate)
225 { 233 {
226 return toV8(impl, creationContext, isolate); 234 return toV8(impl, creationContext, isolate);
227 } 235 }
228 236
229 } // namespace WebCore 237 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestInterface2.cpp ('k') | Source/bindings/tests/results/V8TestInterfaceConstructor2.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698