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

Side by Side Diff: Source/bindings/tests/results/V8TestInterfaceGarbageCollected.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 "V8TestInterfaceGarbageCollected.h" 8 #include "V8TestInterfaceGarbageCollected.h"
9 9
10 #include "RuntimeEnabledFeatures.h" 10 #include "RuntimeEnabledFeatures.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 static void attr1AttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Va lue> v8Value, const v8::PropertyCallbackInfo<void>& info) 68 static void attr1AttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Va lue> v8Value, const v8::PropertyCallbackInfo<void>& info)
69 { 69 {
70 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter"); 70 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMSetter");
71 TestInterfaceGarbageCollectedV8Internal::attr1AttributeSetter(v8Value, info) ; 71 TestInterfaceGarbageCollectedV8Internal::attr1AttributeSetter(v8Value, info) ;
72 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 72 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
73 } 73 }
74 74
75 static void funcMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 75 static void funcMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
76 { 76 {
77 if (UNLIKELY(info.Length() < 1)) { 77 if (UNLIKELY(info.Length() < 1)) {
78 throwArityTypeErrorForMethod("func", "TestInterfaceGarbageCollected", 1, info.Length(), info.GetIsolate()); 78 throwMinimumArityTypeErrorForMethod("func", "TestInterfaceGarbageCollect ed", 1, info.Length(), info.GetIsolate());
79 return; 79 return;
80 } 80 }
81 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toNat ive(info.Holder()); 81 TestInterfaceGarbageCollected* impl = V8TestInterfaceGarbageCollected::toNat ive(info.Holder());
82 TONATIVE_VOID(TestInterfaceGarbageCollected*, arg, V8TestInterfaceGarbageCol lected::toNativeWithTypeCheck(info.GetIsolate(), info[0])); 82 TONATIVE_VOID(TestInterfaceGarbageCollected*, arg, V8TestInterfaceGarbageCol lected::toNativeWithTypeCheck(info.GetIsolate(), info[0]));
83 impl->func(arg); 83 impl->func(arg);
84 } 84 }
85 85
86 static void funcMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 86 static void funcMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
87 { 87 {
88 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod"); 88 TRACE_EVENT_SET_SAMPLING_STATE("Blink", "DOMMethod");
89 TestInterfaceGarbageCollectedV8Internal::funcMethod(info); 89 TestInterfaceGarbageCollectedV8Internal::funcMethod(info);
90 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); 90 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution");
91 } 91 }
92 92
93 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info) 93 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info)
94 { 94 {
95 v8::Isolate* isolate = info.GetIsolate(); 95 v8::Isolate* isolate = info.GetIsolate();
96 if (UNLIKELY(info.Length() < 1)) { 96 if (UNLIKELY(info.Length() < 1)) {
97 throwArityTypeErrorForConstructor("TestInterfaceGarbageCollected", 1, in fo.Length(), info.GetIsolate()); 97 throwMinimumArityTypeErrorForConstructor("TestInterfaceGarbageCollected" , 1, info.Length(), info.GetIsolate());
98 return; 98 return;
99 } 99 }
100 TOSTRING_VOID(V8StringResource<>, str, info[0]); 100 TOSTRING_VOID(V8StringResource<>, str, info[0]);
101 RawPtr<TestInterfaceGarbageCollected> impl = TestInterfaceGarbageCollected:: create(str); 101 RawPtr<TestInterfaceGarbageCollected> impl = TestInterfaceGarbageCollected:: create(str);
102 102
103 v8::Handle<v8::Object> wrapper = info.Holder(); 103 v8::Handle<v8::Object> wrapper = info.Holder();
104 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceGarbageCollected>(im pl.release(), &V8TestInterfaceGarbageCollected::wrapperTypeInfo, wrapper, isolat e, WrapperConfiguration::Independent); 104 V8DOMWrapper::associateObjectWithWrapper<V8TestInterfaceGarbageCollected>(im pl.release(), &V8TestInterfaceGarbageCollected::wrapperTypeInfo, wrapper, isolat e, WrapperConfiguration::Independent);
105 v8SetReturnValue(info, wrapper); 105 v8SetReturnValue(info, wrapper);
106 } 106 }
107 107
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 { 208 {
209 } 209 }
210 210
211 template<> 211 template<>
212 v8::Handle<v8::Value> toV8NoInline(TestInterfaceGarbageCollected* impl, v8::Hand le<v8::Object> creationContext, v8::Isolate* isolate) 212 v8::Handle<v8::Value> toV8NoInline(TestInterfaceGarbageCollected* impl, v8::Hand le<v8::Object> creationContext, v8::Isolate* isolate)
213 { 213 {
214 return toV8(impl, creationContext, isolate); 214 return toV8(impl, creationContext, isolate);
215 } 215 }
216 216
217 } // namespace WebCore 217 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698