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

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

Issue 537403002: bindings: Renames from/toInternalPointer, etc. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Synced. Created 6 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
« no previous file with comments | « Source/bindings/tests/results/V8TestTypedefs.h ('k') | Source/core/dom/Document.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "V8TestTypedefs.h" 8 #include "V8TestTypedefs.h"
9 9
10 #include "bindings/core/v8/ExceptionState.h" 10 #include "bindings/core/v8/ExceptionState.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 // bindings/core/v8/ScriptWrappable.h. 45 // bindings/core/v8/ScriptWrappable.h.
46 const WrapperTypeInfo& TestTypedefs::s_wrapperTypeInfo = V8TestTypedefs::wrapper TypeInfo; 46 const WrapperTypeInfo& TestTypedefs::s_wrapperTypeInfo = V8TestTypedefs::wrapper TypeInfo;
47 47
48 namespace TestTypedefsV8Internal { 48 namespace TestTypedefsV8Internal {
49 49
50 template <typename T> void V8_USE(T) { } 50 template <typename T> void V8_USE(T) { }
51 51
52 static void uLongLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8: :Value>& info) 52 static void uLongLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8: :Value>& info)
53 { 53 {
54 v8::Handle<v8::Object> holder = info.Holder(); 54 v8::Handle<v8::Object> holder = info.Holder();
55 TestTypedefs* impl = V8TestTypedefs::toNative(holder); 55 TestTypedefs* impl = V8TestTypedefs::toImpl(holder);
56 v8SetReturnValue(info, static_cast<double>(impl->uLongLongAttribute())); 56 v8SetReturnValue(info, static_cast<double>(impl->uLongLongAttribute()));
57 } 57 }
58 58
59 static void uLongLongAttributeAttributeGetterCallback(v8::Local<v8::String>, con st v8::PropertyCallbackInfo<v8::Value>& info) 59 static void uLongLongAttributeAttributeGetterCallback(v8::Local<v8::String>, con st v8::PropertyCallbackInfo<v8::Value>& info)
60 { 60 {
61 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter"); 61 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMGetter");
62 TestTypedefsV8Internal::uLongLongAttributeAttributeGetter(info); 62 TestTypedefsV8Internal::uLongLongAttributeAttributeGetter(info);
63 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 63 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
64 } 64 }
65 65
66 static void uLongLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, cons t v8::PropertyCallbackInfo<void>& info) 66 static void uLongLongAttributeAttributeSetter(v8::Local<v8::Value> v8Value, cons t v8::PropertyCallbackInfo<void>& info)
67 { 67 {
68 v8::Handle<v8::Object> holder = info.Holder(); 68 v8::Handle<v8::Object> holder = info.Holder();
69 ExceptionState exceptionState(ExceptionState::SetterContext, "uLongLongAttri bute", "TestTypedefs", holder, info.GetIsolate()); 69 ExceptionState exceptionState(ExceptionState::SetterContext, "uLongLongAttri bute", "TestTypedefs", holder, info.GetIsolate());
70 TestTypedefs* impl = V8TestTypedefs::toNative(holder); 70 TestTypedefs* impl = V8TestTypedefs::toImpl(holder);
71 TONATIVE_VOID_EXCEPTIONSTATE(unsigned long long, cppValue, toUInt64(v8Value, exceptionState), exceptionState); 71 TONATIVE_VOID_EXCEPTIONSTATE(unsigned long long, cppValue, toUInt64(v8Value, exceptionState), exceptionState);
72 impl->setULongLongAttribute(cppValue); 72 impl->setULongLongAttribute(cppValue);
73 } 73 }
74 74
75 static void uLongLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8: :Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 75 static void uLongLongAttributeAttributeSetterCallback(v8::Local<v8::String>, v8: :Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
76 { 76 {
77 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter"); 77 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMSetter");
78 TestTypedefsV8Internal::uLongLongAttributeAttributeSetter(v8Value, info); 78 TestTypedefsV8Internal::uLongLongAttributeAttributeSetter(v8Value, info);
79 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 79 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
80 } 80 }
(...skipping 14 matching lines...) Expand all
95 v8::Handle<v8::Object>::Cast(info.This())->ForceSet(name, v8Value); 95 v8::Handle<v8::Object>::Cast(info.This())->ForceSet(name, v8Value);
96 } 96 }
97 97
98 static void TestTypedefsForceSetAttributeOnThisCallback(v8::Local<v8::String> na me, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info) 98 static void TestTypedefsForceSetAttributeOnThisCallback(v8::Local<v8::String> na me, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<void>& info)
99 { 99 {
100 TestTypedefsV8Internal::TestTypedefsForceSetAttributeOnThis(name, v8Value, i nfo); 100 TestTypedefsV8Internal::TestTypedefsForceSetAttributeOnThis(name, v8Value, i nfo);
101 } 101 }
102 102
103 static void voidMethodArrayOfLongsArgMethod(const v8::FunctionCallbackInfo<v8::V alue>& info) 103 static void voidMethodArrayOfLongsArgMethod(const v8::FunctionCallbackInfo<v8::V alue>& info)
104 { 104 {
105 TestTypedefs* impl = V8TestTypedefs::toNative(info.Holder()); 105 TestTypedefs* impl = V8TestTypedefs::toImpl(info.Holder());
106 Vector<int> arrayOfLongsArg; 106 Vector<int> arrayOfLongsArg;
107 { 107 {
108 v8::TryCatch block; 108 v8::TryCatch block;
109 V8RethrowTryCatchScope rethrow(block); 109 V8RethrowTryCatchScope rethrow(block);
110 if (UNLIKELY(info.Length() <= 0)) { 110 if (UNLIKELY(info.Length() <= 0)) {
111 impl->voidMethodArrayOfLongsArg(); 111 impl->voidMethodArrayOfLongsArg();
112 return; 112 return;
113 } 113 }
114 TONATIVE_VOID_INTERNAL(arrayOfLongsArg, toNativeArray<int>(info[0], 1, i nfo.GetIsolate())); 114 TONATIVE_VOID_INTERNAL(arrayOfLongsArg, toImplArray<int>(info[0], 1, inf o.GetIsolate()));
115 } 115 }
116 impl->voidMethodArrayOfLongsArg(arrayOfLongsArg); 116 impl->voidMethodArrayOfLongsArg(arrayOfLongsArg);
117 } 117 }
118 118
119 static void voidMethodArrayOfLongsArgMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info) 119 static void voidMethodArrayOfLongsArgMethodCallback(const v8::FunctionCallbackIn fo<v8::Value>& info)
120 { 120 {
121 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 121 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
122 TestTypedefsV8Internal::voidMethodArrayOfLongsArgMethod(info); 122 TestTypedefsV8Internal::voidMethodArrayOfLongsArgMethod(info);
123 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 123 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
124 } 124 }
125 125
126 static void voidMethodFloatArgStringArgMethod(const v8::FunctionCallbackInfo<v8: :Value>& info) 126 static void voidMethodFloatArgStringArgMethod(const v8::FunctionCallbackInfo<v8: :Value>& info)
127 { 127 {
128 if (UNLIKELY(info.Length() < 2)) { 128 if (UNLIKELY(info.Length() < 2)) {
129 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v oidMethodFloatArgStringArg", "TestTypedefs", 2, info.Length(), info.GetIsolate() ), info.GetIsolate()); 129 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v oidMethodFloatArgStringArg", "TestTypedefs", 2, info.Length(), info.GetIsolate() ), info.GetIsolate());
130 return; 130 return;
131 } 131 }
132 TestTypedefs* impl = V8TestTypedefs::toNative(info.Holder()); 132 TestTypedefs* impl = V8TestTypedefs::toImpl(info.Holder());
133 float floatArg; 133 float floatArg;
134 V8StringResource<> stringArg; 134 V8StringResource<> stringArg;
135 { 135 {
136 v8::TryCatch block; 136 v8::TryCatch block;
137 V8RethrowTryCatchScope rethrow(block); 137 V8RethrowTryCatchScope rethrow(block);
138 TONATIVE_VOID_INTERNAL(floatArg, static_cast<float>(info[0]->NumberValue ())); 138 TONATIVE_VOID_INTERNAL(floatArg, static_cast<float>(info[0]->NumberValue ()));
139 TOSTRING_VOID_INTERNAL(stringArg, info[1]); 139 TOSTRING_VOID_INTERNAL(stringArg, info[1]);
140 } 140 }
141 impl->voidMethodFloatArgStringArg(floatArg, stringArg); 141 impl->voidMethodFloatArgStringArg(floatArg, stringArg);
142 } 142 }
143 143
144 static void voidMethodFloatArgStringArgMethodCallback(const v8::FunctionCallback Info<v8::Value>& info) 144 static void voidMethodFloatArgStringArgMethodCallback(const v8::FunctionCallback Info<v8::Value>& info)
145 { 145 {
146 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 146 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
147 TestTypedefsV8Internal::voidMethodFloatArgStringArgMethod(info); 147 TestTypedefsV8Internal::voidMethodFloatArgStringArgMethod(info);
148 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 148 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
149 } 149 }
150 150
151 static void voidMethodTestCallbackInterfaceTypeArgMethod(const v8::FunctionCallb ackInfo<v8::Value>& info) 151 static void voidMethodTestCallbackInterfaceTypeArgMethod(const v8::FunctionCallb ackInfo<v8::Value>& info)
152 { 152 {
153 if (UNLIKELY(info.Length() < 1)) { 153 if (UNLIKELY(info.Length() < 1)) {
154 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v oidMethodTestCallbackInterfaceTypeArg", "TestTypedefs", 1, info.Length(), info.G etIsolate()), info.GetIsolate()); 154 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("v oidMethodTestCallbackInterfaceTypeArg", "TestTypedefs", 1, info.Length(), info.G etIsolate()), info.GetIsolate());
155 return; 155 return;
156 } 156 }
157 TestTypedefs* impl = V8TestTypedefs::toNative(info.Holder()); 157 TestTypedefs* impl = V8TestTypedefs::toImpl(info.Holder());
158 OwnPtrWillBeRawPtr<TestCallbackInterface> testCallbackInterfaceTypeArg = nul lptr;; 158 OwnPtrWillBeRawPtr<TestCallbackInterface> testCallbackInterfaceTypeArg = nul lptr;;
159 { 159 {
160 if (info.Length() <= 0 || !info[0]->IsFunction()) { 160 if (info.Length() <= 0 || !info[0]->IsFunction()) {
161 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute( "voidMethodTestCallbackInterfaceTypeArg", "TestTypedefs", "The callback provided as parameter 1 is not a function."), info.GetIsolate()); 161 V8ThrowException::throwTypeError(ExceptionMessages::failedToExecute( "voidMethodTestCallbackInterfaceTypeArg", "TestTypedefs", "The callback provided as parameter 1 is not a function."), info.GetIsolate());
162 return; 162 return;
163 } 163 }
164 testCallbackInterfaceTypeArg = V8TestCallbackInterface::create(v8::Handl e<v8::Function>::Cast(info[0]), ScriptState::current(info.GetIsolate())); 164 testCallbackInterfaceTypeArg = V8TestCallbackInterface::create(v8::Handl e<v8::Function>::Cast(info[0]), ScriptState::current(info.GetIsolate()));
165 } 165 }
166 impl->voidMethodTestCallbackInterfaceTypeArg(testCallbackInterfaceTypeArg.re lease()); 166 impl->voidMethodTestCallbackInterfaceTypeArg(testCallbackInterfaceTypeArg.re lease());
167 } 167 }
168 168
169 static void voidMethodTestCallbackInterfaceTypeArgMethodCallback(const v8::Funct ionCallbackInfo<v8::Value>& info) 169 static void voidMethodTestCallbackInterfaceTypeArgMethodCallback(const v8::Funct ionCallbackInfo<v8::Value>& info)
170 { 170 {
171 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 171 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
172 TestTypedefsV8Internal::voidMethodTestCallbackInterfaceTypeArgMethod(info); 172 TestTypedefsV8Internal::voidMethodTestCallbackInterfaceTypeArgMethod(info);
173 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 173 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
174 } 174 }
175 175
176 static void uLongLongMethodTestInterfaceEmptyTypeSequenceArgMethod(const v8::Fun ctionCallbackInfo<v8::Value>& info) 176 static void uLongLongMethodTestInterfaceEmptyTypeSequenceArgMethod(const v8::Fun ctionCallbackInfo<v8::Value>& info)
177 { 177 {
178 if (UNLIKELY(info.Length() < 1)) { 178 if (UNLIKELY(info.Length() < 1)) {
179 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("u LongLongMethodTestInterfaceEmptyTypeSequenceArg", "TestTypedefs", 1, info.Length (), info.GetIsolate()), info.GetIsolate()); 179 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("u LongLongMethodTestInterfaceEmptyTypeSequenceArg", "TestTypedefs", 1, info.Length (), info.GetIsolate()), info.GetIsolate());
180 return; 180 return;
181 } 181 }
182 TestTypedefs* impl = V8TestTypedefs::toNative(info.Holder()); 182 TestTypedefs* impl = V8TestTypedefs::toImpl(info.Holder());
183 Vector<RefPtr<TestInterfaceEmpty> > testInterfaceEmptyTypeSequenceArg; 183 Vector<RefPtr<TestInterfaceEmpty> > testInterfaceEmptyTypeSequenceArg;
184 { 184 {
185 v8::TryCatch block; 185 v8::TryCatch block;
186 V8RethrowTryCatchScope rethrow(block); 186 V8RethrowTryCatchScope rethrow(block);
187 TONATIVE_VOID_INTERNAL(testInterfaceEmptyTypeSequenceArg, (toRefPtrNativ eArray<TestInterfaceEmpty, V8TestInterfaceEmpty>(info[0], 1, info.GetIsolate())) ); 187 TONATIVE_VOID_INTERNAL(testInterfaceEmptyTypeSequenceArg, (toRefPtrNativ eArray<TestInterfaceEmpty, V8TestInterfaceEmpty>(info[0], 1, info.GetIsolate())) );
188 } 188 }
189 v8SetReturnValue(info, static_cast<double>(impl->uLongLongMethodTestInterfac eEmptyTypeSequenceArg(testInterfaceEmptyTypeSequenceArg))); 189 v8SetReturnValue(info, static_cast<double>(impl->uLongLongMethodTestInterfac eEmptyTypeSequenceArg(testInterfaceEmptyTypeSequenceArg)));
190 } 190 }
191 191
192 static void uLongLongMethodTestInterfaceEmptyTypeSequenceArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 192 static void uLongLongMethodTestInterfaceEmptyTypeSequenceArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
193 { 193 {
194 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 194 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
195 TestTypedefsV8Internal::uLongLongMethodTestInterfaceEmptyTypeSequenceArgMeth od(info); 195 TestTypedefsV8Internal::uLongLongMethodTestInterfaceEmptyTypeSequenceArgMeth od(info);
196 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 196 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
197 } 197 }
198 198
199 static void testInterfaceOrTestInterfaceEmptyMethodMethod(const v8::FunctionCall backInfo<v8::Value>& info) 199 static void testInterfaceOrTestInterfaceEmptyMethodMethod(const v8::FunctionCall backInfo<v8::Value>& info)
200 { 200 {
201 TestTypedefs* impl = V8TestTypedefs::toNative(info.Holder()); 201 TestTypedefs* impl = V8TestTypedefs::toImpl(info.Holder());
202 RefPtr<TestInterfaceImplementation> result0 = nullptr; 202 RefPtr<TestInterfaceImplementation> result0 = nullptr;
203 RefPtr<TestInterfaceEmpty> result1 = nullptr; 203 RefPtr<TestInterfaceEmpty> result1 = nullptr;
204 impl->testInterfaceOrTestInterfaceEmptyMethod(result0, result1); 204 impl->testInterfaceOrTestInterfaceEmptyMethod(result0, result1);
205 if (result0) { 205 if (result0) {
206 v8SetReturnValue(info, result0.release()); 206 v8SetReturnValue(info, result0.release());
207 return; 207 return;
208 } 208 }
209 if (result1) { 209 if (result1) {
210 v8SetReturnValue(info, result1.release()); 210 v8SetReturnValue(info, result1.release());
211 return; 211 return;
212 } 212 }
213 v8SetReturnValueNull(info); 213 v8SetReturnValueNull(info);
214 } 214 }
215 215
216 static void testInterfaceOrTestInterfaceEmptyMethodMethodCallback(const v8::Func tionCallbackInfo<v8::Value>& info) 216 static void testInterfaceOrTestInterfaceEmptyMethodMethodCallback(const v8::Func tionCallbackInfo<v8::Value>& info)
217 { 217 {
218 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 218 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
219 TestTypedefsV8Internal::testInterfaceOrTestInterfaceEmptyMethodMethod(info); 219 TestTypedefsV8Internal::testInterfaceOrTestInterfaceEmptyMethodMethod(info);
220 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 220 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
221 } 221 }
222 222
223 static void domStringOrDoubleMethodMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info) 223 static void domStringOrDoubleMethodMethod(const v8::FunctionCallbackInfo<v8::Val ue>& info)
224 { 224 {
225 TestTypedefs* impl = V8TestTypedefs::toNative(info.Holder()); 225 TestTypedefs* impl = V8TestTypedefs::toImpl(info.Holder());
226 String result0; 226 String result0;
227 Nullable<double> result1; 227 Nullable<double> result1;
228 impl->domStringOrDoubleMethod(result0, result1); 228 impl->domStringOrDoubleMethod(result0, result1);
229 if (!result0.isNull()) { 229 if (!result0.isNull()) {
230 v8SetReturnValueString(info, result0, info.GetIsolate()); 230 v8SetReturnValueString(info, result0, info.GetIsolate());
231 return; 231 return;
232 } 232 }
233 if (result1) { 233 if (result1) {
234 v8SetReturnValue(info, result1.get()); 234 v8SetReturnValue(info, result1.get());
235 return; 235 return;
236 } 236 }
237 v8SetReturnValueNull(info); 237 v8SetReturnValueNull(info);
238 } 238 }
239 239
240 static void domStringOrDoubleMethodMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info) 240 static void domStringOrDoubleMethodMethodCallback(const v8::FunctionCallbackInfo <v8::Value>& info)
241 { 241 {
242 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 242 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
243 TestTypedefsV8Internal::domStringOrDoubleMethodMethod(info); 243 TestTypedefsV8Internal::domStringOrDoubleMethodMethod(info);
244 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 244 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
245 } 245 }
246 246
247 static void arrayOfStringsMethodArrayOfStringsArgMethod(const v8::FunctionCallba ckInfo<v8::Value>& info) 247 static void arrayOfStringsMethodArrayOfStringsArgMethod(const v8::FunctionCallba ckInfo<v8::Value>& info)
248 { 248 {
249 if (UNLIKELY(info.Length() < 1)) { 249 if (UNLIKELY(info.Length() < 1)) {
250 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("a rrayOfStringsMethodArrayOfStringsArg", "TestTypedefs", 1, info.Length(), info.Ge tIsolate()), info.GetIsolate()); 250 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("a rrayOfStringsMethodArrayOfStringsArg", "TestTypedefs", 1, info.Length(), info.Ge tIsolate()), info.GetIsolate());
251 return; 251 return;
252 } 252 }
253 TestTypedefs* impl = V8TestTypedefs::toNative(info.Holder()); 253 TestTypedefs* impl = V8TestTypedefs::toImpl(info.Holder());
254 Vector<String> arrayOfStringsArg; 254 Vector<String> arrayOfStringsArg;
255 { 255 {
256 v8::TryCatch block; 256 v8::TryCatch block;
257 V8RethrowTryCatchScope rethrow(block); 257 V8RethrowTryCatchScope rethrow(block);
258 TONATIVE_VOID_INTERNAL(arrayOfStringsArg, toNativeArray<String>(info[0], 1, info.GetIsolate())); 258 TONATIVE_VOID_INTERNAL(arrayOfStringsArg, toImplArray<String>(info[0], 1 , info.GetIsolate()));
259 } 259 }
260 v8SetReturnValue(info, v8Array(impl->arrayOfStringsMethodArrayOfStringsArg(a rrayOfStringsArg), info.Holder(), info.GetIsolate())); 260 v8SetReturnValue(info, v8Array(impl->arrayOfStringsMethodArrayOfStringsArg(a rrayOfStringsArg), info.Holder(), info.GetIsolate()));
261 } 261 }
262 262
263 static void arrayOfStringsMethodArrayOfStringsArgMethodCallback(const v8::Functi onCallbackInfo<v8::Value>& info) 263 static void arrayOfStringsMethodArrayOfStringsArgMethodCallback(const v8::Functi onCallbackInfo<v8::Value>& info)
264 { 264 {
265 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 265 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
266 TestTypedefsV8Internal::arrayOfStringsMethodArrayOfStringsArgMethod(info); 266 TestTypedefsV8Internal::arrayOfStringsMethodArrayOfStringsArgMethod(info);
267 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 267 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
268 } 268 }
269 269
270 static void stringArrayMethodStringArrayArgMethod(const v8::FunctionCallbackInfo <v8::Value>& info) 270 static void stringArrayMethodStringArrayArgMethod(const v8::FunctionCallbackInfo <v8::Value>& info)
271 { 271 {
272 if (UNLIKELY(info.Length() < 1)) { 272 if (UNLIKELY(info.Length() < 1)) {
273 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("s tringArrayMethodStringArrayArg", "TestTypedefs", 1, info.Length(), info.GetIsola te()), info.GetIsolate()); 273 V8ThrowException::throwException(createMinimumArityTypeErrorForMethod("s tringArrayMethodStringArrayArg", "TestTypedefs", 1, info.Length(), info.GetIsola te()), info.GetIsolate());
274 return; 274 return;
275 } 275 }
276 TestTypedefs* impl = V8TestTypedefs::toNative(info.Holder()); 276 TestTypedefs* impl = V8TestTypedefs::toImpl(info.Holder());
277 Vector<String> stringArrayArg; 277 Vector<String> stringArrayArg;
278 { 278 {
279 v8::TryCatch block; 279 v8::TryCatch block;
280 V8RethrowTryCatchScope rethrow(block); 280 V8RethrowTryCatchScope rethrow(block);
281 TONATIVE_VOID_INTERNAL(stringArrayArg, toNativeArray<String>(info[0], 1, info.GetIsolate())); 281 TONATIVE_VOID_INTERNAL(stringArrayArg, toImplArray<String>(info[0], 1, i nfo.GetIsolate()));
282 } 282 }
283 v8SetReturnValue(info, v8Array(impl->stringArrayMethodStringArrayArg(stringA rrayArg), info.Holder(), info.GetIsolate())); 283 v8SetReturnValue(info, v8Array(impl->stringArrayMethodStringArrayArg(stringA rrayArg), info.Holder(), info.GetIsolate()));
284 } 284 }
285 285
286 static void stringArrayMethodStringArrayArgMethodCallback(const v8::FunctionCall backInfo<v8::Value>& info) 286 static void stringArrayMethodStringArrayArgMethodCallback(const v8::FunctionCall backInfo<v8::Value>& info)
287 { 287 {
288 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod"); 288 TRACE_EVENT_SET_SAMPLING_STATE("blink", "DOMMethod");
289 TestTypedefsV8Internal::stringArrayMethodStringArrayArgMethod(info); 289 TestTypedefsV8Internal::stringArrayMethodStringArrayArgMethod(info);
290 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution"); 290 TRACE_EVENT_SET_SAMPLING_STATE("v8", "V8Execution");
291 } 291 }
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 bool V8TestTypedefs::hasInstance(v8::Handle<v8::Value> v8Value, v8::Isolate* iso late) 367 bool V8TestTypedefs::hasInstance(v8::Handle<v8::Value> v8Value, v8::Isolate* iso late)
368 { 368 {
369 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Valu e); 369 return V8PerIsolateData::from(isolate)->hasInstance(&wrapperTypeInfo, v8Valu e);
370 } 370 }
371 371
372 v8::Handle<v8::Object> V8TestTypedefs::findInstanceInPrototypeChain(v8::Handle<v 8::Value> v8Value, v8::Isolate* isolate) 372 v8::Handle<v8::Object> V8TestTypedefs::findInstanceInPrototypeChain(v8::Handle<v 8::Value> v8Value, v8::Isolate* isolate)
373 { 373 {
374 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe rTypeInfo, v8Value); 374 return V8PerIsolateData::from(isolate)->findInstanceInPrototypeChain(&wrappe rTypeInfo, v8Value);
375 } 375 }
376 376
377 TestTypedefs* V8TestTypedefs::toNativeWithTypeCheck(v8::Isolate* isolate, v8::Ha ndle<v8::Value> value) 377 TestTypedefs* V8TestTypedefs::toImplWithTypeCheck(v8::Isolate* isolate, v8::Hand le<v8::Value> value)
378 { 378 {
379 return hasInstance(value, isolate) ? fromInternalPointer(blink::toInternalPo inter(v8::Handle<v8::Object>::Cast(value))) : 0; 379 return hasInstance(value, isolate) ? blink::toScriptWrappableBase(v8::Handle <v8::Object>::Cast(value))->toImpl<TestTypedefs>() : 0;
380 } 380 }
381 381
382 382
383 void V8TestTypedefs::refObject(ScriptWrappableBase* internalPointer) 383 void V8TestTypedefs::refObject(ScriptWrappableBase* internalPointer)
384 { 384 {
385 fromInternalPointer(internalPointer)->ref(); 385 internalPointer->toImpl<TestTypedefs>()->ref();
386 } 386 }
387 387
388 void V8TestTypedefs::derefObject(ScriptWrappableBase* internalPointer) 388 void V8TestTypedefs::derefObject(ScriptWrappableBase* internalPointer)
389 { 389 {
390 fromInternalPointer(internalPointer)->deref(); 390 internalPointer->toImpl<TestTypedefs>()->deref();
391 } 391 }
392 392
393 WrapperPersistentNode* V8TestTypedefs::createPersistentHandle(ScriptWrappableBas e* internalPointer) 393 WrapperPersistentNode* V8TestTypedefs::createPersistentHandle(ScriptWrappableBas e* internalPointer)
394 { 394 {
395 ASSERT_NOT_REACHED(); 395 ASSERT_NOT_REACHED();
396 return 0; 396 return 0;
397 } 397 }
398 398
399 template<> 399 template<>
400 v8::Handle<v8::Value> toV8NoInline(TestTypedefs* impl, v8::Handle<v8::Object> cr eationContext, v8::Isolate* isolate) 400 v8::Handle<v8::Value> toV8NoInline(TestTypedefs* impl, v8::Handle<v8::Object> cr eationContext, v8::Isolate* isolate)
401 { 401 {
402 return toV8(impl, creationContext, isolate); 402 return toV8(impl, creationContext, isolate);
403 } 403 }
404 404
405 } // namespace blink 405 } // namespace blink
OLDNEW
« no previous file with comments | « Source/bindings/tests/results/V8TestTypedefs.h ('k') | Source/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698