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

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

Issue 54283002: Rename |args| to |info| in V8 bindings (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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,
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 WebCore::initializeScriptWrappableForInterface(object); 58 WebCore::initializeScriptWrappableForInterface(object);
59 } 59 }
60 60
61 namespace WebCore { 61 namespace WebCore {
62 const WrapperTypeInfo V8TestOverloadedConstructors::wrapperTypeInfo = { V8TestOv erloadedConstructors::GetTemplate, V8TestOverloadedConstructors::derefObject, 0, 0, 0, V8TestOverloadedConstructors::installPerContextEnabledPrototypeProperties , 0, WrapperTypeObjectPrototype }; 62 const WrapperTypeInfo V8TestOverloadedConstructors::wrapperTypeInfo = { V8TestOv erloadedConstructors::GetTemplate, V8TestOverloadedConstructors::derefObject, 0, 0, 0, V8TestOverloadedConstructors::installPerContextEnabledPrototypeProperties , 0, WrapperTypeObjectPrototype };
63 63
64 namespace TestOverloadedConstructorsV8Internal { 64 namespace TestOverloadedConstructorsV8Internal {
65 65
66 template <typename T> void V8_USE(T) { } 66 template <typename T> void V8_USE(T) { }
67 67
68 static void constructor1(const v8::FunctionCallbackInfo<v8::Value>& args) 68 static void constructor1(const v8::FunctionCallbackInfo<v8::Value>& info)
69 { 69 {
70 V8TRYCATCH_VOID(ArrayBuffer*, arrayBuffer, args[0]->IsArrayBuffer() ? V8Arra yBuffer::toNative(v8::Handle<v8::ArrayBuffer>::Cast(args[0])) : 0); 70 V8TRYCATCH_VOID(ArrayBuffer*, arrayBuffer, info[0]->IsArrayBuffer() ? V8Arra yBuffer::toNative(v8::Handle<v8::ArrayBuffer>::Cast(info[0])) : 0);
71 71
72 RefPtr<TestOverloadedConstructors> impl = TestOverloadedConstructors::create (arrayBuffer); 72 RefPtr<TestOverloadedConstructors> impl = TestOverloadedConstructors::create (arrayBuffer);
73 v8::Handle<v8::Object> wrapper = args.Holder(); 73 v8::Handle<v8::Object> wrapper = info.Holder();
74 74
75 V8DOMWrapper::associateObjectWithWrapper<V8TestOverloadedConstructors>(impl. release(), &V8TestOverloadedConstructors::wrapperTypeInfo, wrapper, args.GetIsol ate(), WrapperConfiguration::Dependent); 75 V8DOMWrapper::associateObjectWithWrapper<V8TestOverloadedConstructors>(impl. release(), &V8TestOverloadedConstructors::wrapperTypeInfo, wrapper, info.GetIsol ate(), WrapperConfiguration::Dependent);
76 args.GetReturnValue().Set(wrapper); 76 info.GetReturnValue().Set(wrapper);
77 } 77 }
78 78
79 static void constructor2(const v8::FunctionCallbackInfo<v8::Value>& args) 79 static void constructor2(const v8::FunctionCallbackInfo<v8::Value>& info)
80 { 80 {
81 V8TRYCATCH_VOID(ArrayBufferView*, arrayBufferView, args[0]->IsArrayBufferVie w() ? V8ArrayBufferView::toNative(v8::Handle<v8::ArrayBufferView>::Cast(args[0]) ) : 0); 81 V8TRYCATCH_VOID(ArrayBufferView*, arrayBufferView, info[0]->IsArrayBufferVie w() ? V8ArrayBufferView::toNative(v8::Handle<v8::ArrayBufferView>::Cast(info[0]) ) : 0);
82 82
83 RefPtr<TestOverloadedConstructors> impl = TestOverloadedConstructors::create (arrayBufferView); 83 RefPtr<TestOverloadedConstructors> impl = TestOverloadedConstructors::create (arrayBufferView);
84 v8::Handle<v8::Object> wrapper = args.Holder(); 84 v8::Handle<v8::Object> wrapper = info.Holder();
85 85
86 V8DOMWrapper::associateObjectWithWrapper<V8TestOverloadedConstructors>(impl. release(), &V8TestOverloadedConstructors::wrapperTypeInfo, wrapper, args.GetIsol ate(), WrapperConfiguration::Dependent); 86 V8DOMWrapper::associateObjectWithWrapper<V8TestOverloadedConstructors>(impl. release(), &V8TestOverloadedConstructors::wrapperTypeInfo, wrapper, info.GetIsol ate(), WrapperConfiguration::Dependent);
87 args.GetReturnValue().Set(wrapper); 87 info.GetReturnValue().Set(wrapper);
88 } 88 }
89 89
90 static void constructor3(const v8::FunctionCallbackInfo<v8::Value>& args) 90 static void constructor3(const v8::FunctionCallbackInfo<v8::Value>& info)
91 { 91 {
92 V8TRYCATCH_VOID(Blob*, blob, V8Blob::HasInstance(args[0], args.GetIsolate(), worldType(args.GetIsolate())) ? V8Blob::toNative(v8::Handle<v8::Object>::Cast(a rgs[0])) : 0); 92 V8TRYCATCH_VOID(Blob*, blob, V8Blob::HasInstance(info[0], info.GetIsolate(), worldType(info.GetIsolate())) ? V8Blob::toNative(v8::Handle<v8::Object>::Cast(i nfo[0])) : 0);
93 93
94 RefPtr<TestOverloadedConstructors> impl = TestOverloadedConstructors::create (blob); 94 RefPtr<TestOverloadedConstructors> impl = TestOverloadedConstructors::create (blob);
95 v8::Handle<v8::Object> wrapper = args.Holder(); 95 v8::Handle<v8::Object> wrapper = info.Holder();
96 96
97 V8DOMWrapper::associateObjectWithWrapper<V8TestOverloadedConstructors>(impl. release(), &V8TestOverloadedConstructors::wrapperTypeInfo, wrapper, args.GetIsol ate(), WrapperConfiguration::Dependent); 97 V8DOMWrapper::associateObjectWithWrapper<V8TestOverloadedConstructors>(impl. release(), &V8TestOverloadedConstructors::wrapperTypeInfo, wrapper, info.GetIsol ate(), WrapperConfiguration::Dependent);
98 args.GetReturnValue().Set(wrapper); 98 info.GetReturnValue().Set(wrapper);
99 } 99 }
100 100
101 static void constructor4(const v8::FunctionCallbackInfo<v8::Value>& args) 101 static void constructor4(const v8::FunctionCallbackInfo<v8::Value>& info)
102 { 102 {
103 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, string, args[0]); 103 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, string, info[0]);
104 104
105 RefPtr<TestOverloadedConstructors> impl = TestOverloadedConstructors::create (string); 105 RefPtr<TestOverloadedConstructors> impl = TestOverloadedConstructors::create (string);
106 v8::Handle<v8::Object> wrapper = args.Holder(); 106 v8::Handle<v8::Object> wrapper = info.Holder();
107 107
108 V8DOMWrapper::associateObjectWithWrapper<V8TestOverloadedConstructors>(impl. release(), &V8TestOverloadedConstructors::wrapperTypeInfo, wrapper, args.GetIsol ate(), WrapperConfiguration::Dependent); 108 V8DOMWrapper::associateObjectWithWrapper<V8TestOverloadedConstructors>(impl. release(), &V8TestOverloadedConstructors::wrapperTypeInfo, wrapper, info.GetIsol ate(), WrapperConfiguration::Dependent);
109 args.GetReturnValue().Set(wrapper); 109 info.GetReturnValue().Set(wrapper);
110 } 110 }
111 111
112 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& args) 112 static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info)
113 { 113 {
114 if ((args.Length() == 1 && (V8ArrayBuffer::HasInstance(args[0], args.GetIsol ate(), worldType(args.GetIsolate()))))) { 114 if ((info.Length() == 1 && (V8ArrayBuffer::HasInstance(info[0], info.GetIsol ate(), worldType(info.GetIsolate()))))) {
115 TestOverloadedConstructorsV8Internal::constructor1(args); 115 TestOverloadedConstructorsV8Internal::constructor1(info);
116 return; 116 return;
117 } 117 }
118 if ((args.Length() == 1 && (V8ArrayBufferView::HasInstance(args[0], args.Get Isolate(), worldType(args.GetIsolate()))))) { 118 if ((info.Length() == 1 && (V8ArrayBufferView::HasInstance(info[0], info.Get Isolate(), worldType(info.GetIsolate()))))) {
119 TestOverloadedConstructorsV8Internal::constructor2(args); 119 TestOverloadedConstructorsV8Internal::constructor2(info);
120 return; 120 return;
121 } 121 }
122 if ((args.Length() == 1 && (V8Blob::HasInstance(args[0], args.GetIsolate(), worldType(args.GetIsolate()))))) { 122 if ((info.Length() == 1 && (V8Blob::HasInstance(info[0], info.GetIsolate(), worldType(info.GetIsolate()))))) {
123 TestOverloadedConstructorsV8Internal::constructor3(args); 123 TestOverloadedConstructorsV8Internal::constructor3(info);
124 return; 124 return;
125 } 125 }
126 if (args.Length() == 1) { 126 if (info.Length() == 1) {
127 TestOverloadedConstructorsV8Internal::constructor4(args); 127 TestOverloadedConstructorsV8Internal::constructor4(info);
128 return; 128 return;
129 } 129 }
130 if (UNLIKELY(args.Length() < 1)) { 130 if (UNLIKELY(info.Length() < 1)) {
131 throwTypeError(ExceptionMessages::failedToConstruct("TestOverloadedConst ructors", ExceptionMessages::notEnoughArguments(1, args.Length())), args.GetIsol ate()); 131 throwTypeError(ExceptionMessages::failedToConstruct("TestOverloadedConst ructors", ExceptionMessages::notEnoughArguments(1, info.Length())), info.GetIsol ate());
132 return; 132 return;
133 } 133 }
134 throwUninformativeAndGenericTypeError(args.GetIsolate()); 134 throwUninformativeAndGenericTypeError(info.GetIsolate());
135 return; 135 return;
136 } 136 }
137 137
138 } // namespace TestOverloadedConstructorsV8Internal 138 } // namespace TestOverloadedConstructorsV8Internal
139 139
140 void V8TestOverloadedConstructors::constructorCallback(const v8::FunctionCallbac kInfo<v8::Value>& args) 140 void V8TestOverloadedConstructors::constructorCallback(const v8::FunctionCallbac kInfo<v8::Value>& info)
141 { 141 {
142 TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "DOMConstructor"); 142 TRACE_EVENT_SCOPED_SAMPLING_STATE("Blink", "DOMConstructor");
143 if (!args.IsConstructCall()) { 143 if (!info.IsConstructCall()) {
144 throwTypeError(ExceptionMessages::failedToConstruct("TestOverloadedConst ructors", "Please use the 'new' operator, this DOM object constructor cannot be called as a function."), args.GetIsolate()); 144 throwTypeError(ExceptionMessages::failedToConstruct("TestOverloadedConst ructors", "Please use the 'new' operator, this DOM object constructor cannot be called as a function."), info.GetIsolate());
145 return; 145 return;
146 } 146 }
147 147
148 if (ConstructorMode::current() == ConstructorMode::WrapExistingObject) { 148 if (ConstructorMode::current() == ConstructorMode::WrapExistingObject) {
149 args.GetReturnValue().Set(args.Holder()); 149 info.GetReturnValue().Set(info.Holder());
150 return; 150 return;
151 } 151 }
152 152
153 TestOverloadedConstructorsV8Internal::constructor(args); 153 TestOverloadedConstructorsV8Internal::constructor(info);
154 } 154 }
155 155
156 static v8::Handle<v8::FunctionTemplate> ConfigureV8TestOverloadedConstructorsTem plate(v8::Handle<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldT ype currentWorldType) 156 static v8::Handle<v8::FunctionTemplate> ConfigureV8TestOverloadedConstructorsTem plate(v8::Handle<v8::FunctionTemplate> desc, v8::Isolate* isolate, WrapperWorldT ype currentWorldType)
157 { 157 {
158 desc->ReadOnlyPrototype(); 158 desc->ReadOnlyPrototype();
159 159
160 v8::Local<v8::Signature> defaultSignature; 160 v8::Local<v8::Signature> defaultSignature;
161 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(desc, "TestOv erloadedConstructors", v8::Local<v8::FunctionTemplate>(), V8TestOverloadedConstr uctors::internalFieldCount, 161 defaultSignature = V8DOMConfiguration::installDOMClassTemplate(desc, "TestOv erloadedConstructors", v8::Local<v8::FunctionTemplate>(), V8TestOverloadedConstr uctors::internalFieldCount,
162 0, 0, 162 0, 0,
163 0, 0, 163 0, 0,
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 V8DOMWrapper::associateObjectWithWrapper<V8TestOverloadedConstructors>(impl, &wrapperTypeInfo, wrapper, isolate, WrapperConfiguration::Independent); 217 V8DOMWrapper::associateObjectWithWrapper<V8TestOverloadedConstructors>(impl, &wrapperTypeInfo, wrapper, isolate, WrapperConfiguration::Independent);
218 return wrapper; 218 return wrapper;
219 } 219 }
220 220
221 void V8TestOverloadedConstructors::derefObject(void* object) 221 void V8TestOverloadedConstructors::derefObject(void* object)
222 { 222 {
223 fromInternalPointer(object)->deref(); 223 fromInternalPointer(object)->deref();
224 } 224 }
225 225
226 } // namespace WebCore 226 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestObjectPython.cpp ('k') | Source/bindings/tests/results/V8TestTypedefs.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698