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

Side by Side Diff: third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface5.cpp

Issue 2061113002: Remove ExceptionState::throwIfNeeded Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: temp Created 4 years, 5 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
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 "V8TestInterface5.h" 7 #include "V8TestInterface5.h"
8 8
9 #include "bindings/core/v8/ExceptionState.h" 9 #include "bindings/core/v8/ExceptionState.h"
10 #include "bindings/core/v8/ScriptState.h" 10 #include "bindings/core/v8/ScriptState.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 } 54 }
55 55
56 static void testInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) 56 static void testInterfaceAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
57 { 57 {
58 v8::Local<v8::Object> holder = info.Holder(); 58 v8::Local<v8::Object> holder = info.Holder();
59 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceA ttribute", "TestInterface5", holder, info.GetIsolate()); 59 ExceptionState exceptionState(ExceptionState::SetterContext, "testInterfaceA ttribute", "TestInterface5", holder, info.GetIsolate());
60 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); 60 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
61 TestInterface5Implementation* cppValue = V8TestInterface5::toImplWithTypeChe ck(info.GetIsolate(), v8Value); 61 TestInterface5Implementation* cppValue = V8TestInterface5::toImplWithTypeChe ck(info.GetIsolate(), v8Value);
62 if (!cppValue) { 62 if (!cppValue) {
63 exceptionState.throwTypeError("The provided value is not of type 'TestIn terface5'."); 63 exceptionState.throwTypeError("The provided value is not of type 'TestIn terface5'.");
64 exceptionState.throwIfNeeded();
65 return; 64 return;
66 } 65 }
67 impl->setTestInterfaceAttribute(cppValue); 66 impl->setTestInterfaceAttribute(cppValue);
68 } 67 }
69 68
70 static void testInterfaceAttributeAttributeSetterCallback(const v8::FunctionCall backInfo<v8::Value>& info) 69 static void testInterfaceAttributeAttributeSetterCallback(const v8::FunctionCall backInfo<v8::Value>& info)
71 { 70 {
72 v8::Local<v8::Value> v8Value = info[0]; 71 v8::Local<v8::Value> v8Value = info[0];
73 TestInterface5ImplementationV8Internal::testInterfaceAttributeAttributeSette r(v8Value, info); 72 TestInterface5ImplementationV8Internal::testInterfaceAttributeAttributeSette r(v8Value, info);
74 } 73 }
75 74
76 static void doubleAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Va lue>& info) 75 static void doubleAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Va lue>& info)
77 { 76 {
78 v8::Local<v8::Object> holder = info.Holder(); 77 v8::Local<v8::Object> holder = info.Holder();
79 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); 78 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
80 v8SetReturnValue(info, impl->doubleAttribute()); 79 v8SetReturnValue(info, impl->doubleAttribute());
81 } 80 }
82 81
83 static void doubleAttributeAttributeGetterCallback(const v8::FunctionCallbackInf o<v8::Value>& info) 82 static void doubleAttributeAttributeGetterCallback(const v8::FunctionCallbackInf o<v8::Value>& info)
84 { 83 {
85 TestInterface5ImplementationV8Internal::doubleAttributeAttributeGetter(info) ; 84 TestInterface5ImplementationV8Internal::doubleAttributeAttributeGetter(info) ;
86 } 85 }
87 86
88 static void doubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v 8::FunctionCallbackInfo<v8::Value>& info) 87 static void doubleAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v 8::FunctionCallbackInfo<v8::Value>& info)
89 { 88 {
90 v8::Local<v8::Object> holder = info.Holder(); 89 v8::Local<v8::Object> holder = info.Holder();
91 ExceptionState exceptionState(ExceptionState::SetterContext, "doubleAttribut e", "TestInterface5", holder, info.GetIsolate()); 90 ExceptionState exceptionState(ExceptionState::SetterContext, "doubleAttribut e", "TestInterface5", holder, info.GetIsolate());
92 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); 91 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
93 double cppValue = toRestrictedDouble(info.GetIsolate(), v8Value, exceptionSt ate); 92 double cppValue = toRestrictedDouble(info.GetIsolate(), v8Value, exceptionSt ate);
94 if (exceptionState.throwIfNeeded()) 93 if (exceptionState.hadException()) {
95 return; 94 return;
95 }
96 impl->setDoubleAttribute(cppValue); 96 impl->setDoubleAttribute(cppValue);
97 } 97 }
98 98
99 static void doubleAttributeAttributeSetterCallback(const v8::FunctionCallbackInf o<v8::Value>& info) 99 static void doubleAttributeAttributeSetterCallback(const v8::FunctionCallbackInf o<v8::Value>& info)
100 { 100 {
101 v8::Local<v8::Value> v8Value = info[0]; 101 v8::Local<v8::Value> v8Value = info[0];
102 TestInterface5ImplementationV8Internal::doubleAttributeAttributeSetter(v8Val ue, info); 102 TestInterface5ImplementationV8Internal::doubleAttributeAttributeSetter(v8Val ue, info);
103 } 103 }
104 104
105 static void floatAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Val ue>& info) 105 static void floatAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Val ue>& info)
106 { 106 {
107 v8::Local<v8::Object> holder = info.Holder(); 107 v8::Local<v8::Object> holder = info.Holder();
108 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); 108 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
109 v8SetReturnValue(info, impl->floatAttribute()); 109 v8SetReturnValue(info, impl->floatAttribute());
110 } 110 }
111 111
112 static void floatAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo <v8::Value>& info) 112 static void floatAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo <v8::Value>& info)
113 { 113 {
114 TestInterface5ImplementationV8Internal::floatAttributeAttributeGetter(info); 114 TestInterface5ImplementationV8Internal::floatAttributeAttributeGetter(info);
115 } 115 }
116 116
117 static void floatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8 ::FunctionCallbackInfo<v8::Value>& info) 117 static void floatAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8 ::FunctionCallbackInfo<v8::Value>& info)
118 { 118 {
119 v8::Local<v8::Object> holder = info.Holder(); 119 v8::Local<v8::Object> holder = info.Holder();
120 ExceptionState exceptionState(ExceptionState::SetterContext, "floatAttribute ", "TestInterface5", holder, info.GetIsolate()); 120 ExceptionState exceptionState(ExceptionState::SetterContext, "floatAttribute ", "TestInterface5", holder, info.GetIsolate());
121 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); 121 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
122 float cppValue = toRestrictedFloat(info.GetIsolate(), v8Value, exceptionStat e); 122 float cppValue = toRestrictedFloat(info.GetIsolate(), v8Value, exceptionStat e);
123 if (exceptionState.throwIfNeeded()) 123 if (exceptionState.hadException()) {
124 return; 124 return;
125 }
125 impl->setFloatAttribute(cppValue); 126 impl->setFloatAttribute(cppValue);
126 } 127 }
127 128
128 static void floatAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo <v8::Value>& info) 129 static void floatAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo <v8::Value>& info)
129 { 130 {
130 v8::Local<v8::Value> v8Value = info[0]; 131 v8::Local<v8::Value> v8Value = info[0];
131 TestInterface5ImplementationV8Internal::floatAttributeAttributeSetter(v8Valu e, info); 132 TestInterface5ImplementationV8Internal::floatAttributeAttributeSetter(v8Valu e, info);
132 } 133 }
133 134
134 static void unrestrictedDoubleAttributeAttributeGetter(const v8::FunctionCallbac kInfo<v8::Value>& info) 135 static void unrestrictedDoubleAttributeAttributeGetter(const v8::FunctionCallbac kInfo<v8::Value>& info)
135 { 136 {
136 v8::Local<v8::Object> holder = info.Holder(); 137 v8::Local<v8::Object> holder = info.Holder();
137 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); 138 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
138 v8SetReturnValue(info, impl->unrestrictedDoubleAttribute()); 139 v8SetReturnValue(info, impl->unrestrictedDoubleAttribute());
139 } 140 }
140 141
141 static void unrestrictedDoubleAttributeAttributeGetterCallback(const v8::Functio nCallbackInfo<v8::Value>& info) 142 static void unrestrictedDoubleAttributeAttributeGetterCallback(const v8::Functio nCallbackInfo<v8::Value>& info)
142 { 143 {
143 TestInterface5ImplementationV8Internal::unrestrictedDoubleAttributeAttribute Getter(info); 144 TestInterface5ImplementationV8Internal::unrestrictedDoubleAttributeAttribute Getter(info);
144 } 145 }
145 146
146 static void unrestrictedDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Va lue, const v8::FunctionCallbackInfo<v8::Value>& info) 147 static void unrestrictedDoubleAttributeAttributeSetter(v8::Local<v8::Value> v8Va lue, const v8::FunctionCallbackInfo<v8::Value>& info)
147 { 148 {
148 v8::Local<v8::Object> holder = info.Holder(); 149 v8::Local<v8::Object> holder = info.Holder();
149 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedDo ubleAttribute", "TestInterface5", holder, info.GetIsolate()); 150 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedDo ubleAttribute", "TestInterface5", holder, info.GetIsolate());
150 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); 151 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
151 double cppValue = toDouble(info.GetIsolate(), v8Value, exceptionState); 152 double cppValue = toDouble(info.GetIsolate(), v8Value, exceptionState);
152 if (exceptionState.throwIfNeeded()) 153 if (exceptionState.hadException()) {
153 return; 154 return;
155 }
154 impl->setUnrestrictedDoubleAttribute(cppValue); 156 impl->setUnrestrictedDoubleAttribute(cppValue);
155 } 157 }
156 158
157 static void unrestrictedDoubleAttributeAttributeSetterCallback(const v8::Functio nCallbackInfo<v8::Value>& info) 159 static void unrestrictedDoubleAttributeAttributeSetterCallback(const v8::Functio nCallbackInfo<v8::Value>& info)
158 { 160 {
159 v8::Local<v8::Value> v8Value = info[0]; 161 v8::Local<v8::Value> v8Value = info[0];
160 TestInterface5ImplementationV8Internal::unrestrictedDoubleAttributeAttribute Setter(v8Value, info); 162 TestInterface5ImplementationV8Internal::unrestrictedDoubleAttributeAttribute Setter(v8Value, info);
161 } 163 }
162 164
163 static void unrestrictedFloatAttributeAttributeGetter(const v8::FunctionCallback Info<v8::Value>& info) 165 static void unrestrictedFloatAttributeAttributeGetter(const v8::FunctionCallback Info<v8::Value>& info)
164 { 166 {
165 v8::Local<v8::Object> holder = info.Holder(); 167 v8::Local<v8::Object> holder = info.Holder();
166 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); 168 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
167 v8SetReturnValue(info, impl->unrestrictedFloatAttribute()); 169 v8SetReturnValue(info, impl->unrestrictedFloatAttribute());
168 } 170 }
169 171
170 static void unrestrictedFloatAttributeAttributeGetterCallback(const v8::Function CallbackInfo<v8::Value>& info) 172 static void unrestrictedFloatAttributeAttributeGetterCallback(const v8::Function CallbackInfo<v8::Value>& info)
171 { 173 {
172 TestInterface5ImplementationV8Internal::unrestrictedFloatAttributeAttributeG etter(info); 174 TestInterface5ImplementationV8Internal::unrestrictedFloatAttributeAttributeG etter(info);
173 } 175 }
174 176
175 static void unrestrictedFloatAttributeAttributeSetter(v8::Local<v8::Value> v8Val ue, const v8::FunctionCallbackInfo<v8::Value>& info) 177 static void unrestrictedFloatAttributeAttributeSetter(v8::Local<v8::Value> v8Val ue, const v8::FunctionCallbackInfo<v8::Value>& info)
176 { 178 {
177 v8::Local<v8::Object> holder = info.Holder(); 179 v8::Local<v8::Object> holder = info.Holder();
178 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedFl oatAttribute", "TestInterface5", holder, info.GetIsolate()); 180 ExceptionState exceptionState(ExceptionState::SetterContext, "unrestrictedFl oatAttribute", "TestInterface5", holder, info.GetIsolate());
179 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); 181 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
180 float cppValue = toFloat(info.GetIsolate(), v8Value, exceptionState); 182 float cppValue = toFloat(info.GetIsolate(), v8Value, exceptionState);
181 if (exceptionState.throwIfNeeded()) 183 if (exceptionState.hadException()) {
182 return; 184 return;
185 }
183 impl->setUnrestrictedFloatAttribute(cppValue); 186 impl->setUnrestrictedFloatAttribute(cppValue);
184 } 187 }
185 188
186 static void unrestrictedFloatAttributeAttributeSetterCallback(const v8::Function CallbackInfo<v8::Value>& info) 189 static void unrestrictedFloatAttributeAttributeSetterCallback(const v8::Function CallbackInfo<v8::Value>& info)
187 { 190 {
188 v8::Local<v8::Value> v8Value = info[0]; 191 v8::Local<v8::Value> v8Value = info[0];
189 TestInterface5ImplementationV8Internal::unrestrictedFloatAttributeAttributeS etter(v8Value, info); 192 TestInterface5ImplementationV8Internal::unrestrictedFloatAttributeAttributeS etter(v8Value, info);
190 } 193 }
191 194
192 static void staticStringAttributeAttributeGetter(const v8::FunctionCallbackInfo< v8::Value>& info) 195 static void staticStringAttributeAttributeGetter(const v8::FunctionCallbackInfo< v8::Value>& info)
193 { 196 {
194 v8SetReturnValueString(info, TestInterface5Implementation::staticStringAttri bute(), info.GetIsolate()); 197 v8SetReturnValueString(info, TestInterface5Implementation::staticStringAttri bute(), info.GetIsolate());
195 } 198 }
196 199
197 static void staticStringAttributeAttributeGetterCallback(const v8::FunctionCallb ackInfo<v8::Value>& info) 200 static void staticStringAttributeAttributeGetterCallback(const v8::FunctionCallb ackInfo<v8::Value>& info)
198 { 201 {
199 TestInterface5ImplementationV8Internal::staticStringAttributeAttributeGetter (info); 202 TestInterface5ImplementationV8Internal::staticStringAttributeAttributeGetter (info);
200 } 203 }
201 204
202 static void staticStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c onst v8::FunctionCallbackInfo<v8::Value>& info) 205 static void staticStringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, c onst v8::FunctionCallbackInfo<v8::Value>& info)
203 { 206 {
204 V8StringResource<> cppValue = v8Value; 207 V8StringResource<> cppValue = v8Value;
205 if (!cppValue.prepare()) 208 if (!cppValue.prepare()) {
206 return; 209 return;
210 }
207 TestInterface5Implementation::setStaticStringAttribute(cppValue); 211 TestInterface5Implementation::setStaticStringAttribute(cppValue);
208 } 212 }
209 213
210 static void staticStringAttributeAttributeSetterCallback(const v8::FunctionCallb ackInfo<v8::Value>& info) 214 static void staticStringAttributeAttributeSetterCallback(const v8::FunctionCallb ackInfo<v8::Value>& info)
211 { 215 {
212 v8::Local<v8::Value> v8Value = info[0]; 216 v8::Local<v8::Value> v8Value = info[0];
213 TestInterface5ImplementationV8Internal::staticStringAttributeAttributeSetter (v8Value, info); 217 TestInterface5ImplementationV8Internal::staticStringAttributeAttributeSetter (v8Value, info);
214 } 218 }
215 219
216 static void alwaysExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo <v8::Value>& info) 220 static void alwaysExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo <v8::Value>& info)
217 { 221 {
218 v8::Local<v8::Object> holder = info.Holder(); 222 v8::Local<v8::Object> holder = info.Holder();
219 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); 223 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
220 v8SetReturnValueInt(info, impl->alwaysExposedAttribute()); 224 v8SetReturnValueInt(info, impl->alwaysExposedAttribute());
221 } 225 }
222 226
223 static void alwaysExposedAttributeAttributeGetterCallback(const v8::FunctionCall backInfo<v8::Value>& info) 227 static void alwaysExposedAttributeAttributeGetterCallback(const v8::FunctionCall backInfo<v8::Value>& info)
224 { 228 {
225 TestInterface5ImplementationV8Internal::alwaysExposedAttributeAttributeGette r(info); 229 TestInterface5ImplementationV8Internal::alwaysExposedAttributeAttributeGette r(info);
226 } 230 }
227 231
228 static void alwaysExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) 232 static void alwaysExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
229 { 233 {
230 v8::Local<v8::Object> holder = info.Holder(); 234 v8::Local<v8::Object> holder = info.Holder();
231 ExceptionState exceptionState(ExceptionState::SetterContext, "alwaysExposedA ttribute", "TestInterface5", holder, info.GetIsolate()); 235 ExceptionState exceptionState(ExceptionState::SetterContext, "alwaysExposedA ttribute", "TestInterface5", holder, info.GetIsolate());
232 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); 236 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
233 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti onState); 237 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti onState);
234 if (exceptionState.throwIfNeeded()) 238 if (exceptionState.hadException()) {
235 return; 239 return;
240 }
236 impl->setAlwaysExposedAttribute(cppValue); 241 impl->setAlwaysExposedAttribute(cppValue);
237 } 242 }
238 243
239 static void alwaysExposedAttributeAttributeSetterCallback(const v8::FunctionCall backInfo<v8::Value>& info) 244 static void alwaysExposedAttributeAttributeSetterCallback(const v8::FunctionCall backInfo<v8::Value>& info)
240 { 245 {
241 v8::Local<v8::Value> v8Value = info[0]; 246 v8::Local<v8::Value> v8Value = info[0];
242 TestInterface5ImplementationV8Internal::alwaysExposedAttributeAttributeSette r(v8Value, info); 247 TestInterface5ImplementationV8Internal::alwaysExposedAttributeAttributeSette r(v8Value, info);
243 } 248 }
244 249
245 static void workerExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo <v8::Value>& info) 250 static void workerExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo <v8::Value>& info)
246 { 251 {
247 v8::Local<v8::Object> holder = info.Holder(); 252 v8::Local<v8::Object> holder = info.Holder();
248 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); 253 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
249 v8SetReturnValueInt(info, impl->workerExposedAttribute()); 254 v8SetReturnValueInt(info, impl->workerExposedAttribute());
250 } 255 }
251 256
252 static void workerExposedAttributeAttributeGetterCallback(const v8::FunctionCall backInfo<v8::Value>& info) 257 static void workerExposedAttributeAttributeGetterCallback(const v8::FunctionCall backInfo<v8::Value>& info)
253 { 258 {
254 TestInterface5ImplementationV8Internal::workerExposedAttributeAttributeGette r(info); 259 TestInterface5ImplementationV8Internal::workerExposedAttributeAttributeGette r(info);
255 } 260 }
256 261
257 static void workerExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) 262 static void workerExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
258 { 263 {
259 v8::Local<v8::Object> holder = info.Holder(); 264 v8::Local<v8::Object> holder = info.Holder();
260 ExceptionState exceptionState(ExceptionState::SetterContext, "workerExposedA ttribute", "TestInterface5", holder, info.GetIsolate()); 265 ExceptionState exceptionState(ExceptionState::SetterContext, "workerExposedA ttribute", "TestInterface5", holder, info.GetIsolate());
261 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); 266 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
262 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti onState); 267 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti onState);
263 if (exceptionState.throwIfNeeded()) 268 if (exceptionState.hadException()) {
264 return; 269 return;
270 }
265 impl->setWorkerExposedAttribute(cppValue); 271 impl->setWorkerExposedAttribute(cppValue);
266 } 272 }
267 273
268 static void workerExposedAttributeAttributeSetterCallback(const v8::FunctionCall backInfo<v8::Value>& info) 274 static void workerExposedAttributeAttributeSetterCallback(const v8::FunctionCall backInfo<v8::Value>& info)
269 { 275 {
270 v8::Local<v8::Value> v8Value = info[0]; 276 v8::Local<v8::Value> v8Value = info[0];
271 TestInterface5ImplementationV8Internal::workerExposedAttributeAttributeSette r(v8Value, info); 277 TestInterface5ImplementationV8Internal::workerExposedAttributeAttributeSette r(v8Value, info);
272 } 278 }
273 279
274 static void windowExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo <v8::Value>& info) 280 static void windowExposedAttributeAttributeGetter(const v8::FunctionCallbackInfo <v8::Value>& info)
275 { 281 {
276 v8::Local<v8::Object> holder = info.Holder(); 282 v8::Local<v8::Object> holder = info.Holder();
277 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); 283 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
278 v8SetReturnValueInt(info, impl->windowExposedAttribute()); 284 v8SetReturnValueInt(info, impl->windowExposedAttribute());
279 } 285 }
280 286
281 static void windowExposedAttributeAttributeGetterCallback(const v8::FunctionCall backInfo<v8::Value>& info) 287 static void windowExposedAttributeAttributeGetterCallback(const v8::FunctionCall backInfo<v8::Value>& info)
282 { 288 {
283 TestInterface5ImplementationV8Internal::windowExposedAttributeAttributeGette r(info); 289 TestInterface5ImplementationV8Internal::windowExposedAttributeAttributeGette r(info);
284 } 290 }
285 291
286 static void windowExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) 292 static void windowExposedAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info)
287 { 293 {
288 v8::Local<v8::Object> holder = info.Holder(); 294 v8::Local<v8::Object> holder = info.Holder();
289 ExceptionState exceptionState(ExceptionState::SetterContext, "windowExposedA ttribute", "TestInterface5", holder, info.GetIsolate()); 295 ExceptionState exceptionState(ExceptionState::SetterContext, "windowExposedA ttribute", "TestInterface5", holder, info.GetIsolate());
290 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder); 296 TestInterface5Implementation* impl = V8TestInterface5::toImpl(holder);
291 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti onState); 297 int cppValue = toInt32(info.GetIsolate(), v8Value, NormalConversion, excepti onState);
292 if (exceptionState.throwIfNeeded()) 298 if (exceptionState.hadException()) {
293 return; 299 return;
300 }
294 impl->setWindowExposedAttribute(cppValue); 301 impl->setWindowExposedAttribute(cppValue);
295 } 302 }
296 303
297 static void windowExposedAttributeAttributeSetterCallback(const v8::FunctionCall backInfo<v8::Value>& info) 304 static void windowExposedAttributeAttributeSetterCallback(const v8::FunctionCall backInfo<v8::Value>& info)
298 { 305 {
299 v8::Local<v8::Value> v8Value = info[0]; 306 v8::Local<v8::Value> v8Value = info[0];
300 TestInterface5ImplementationV8Internal::windowExposedAttributeAttributeSette r(v8Value, info); 307 TestInterface5ImplementationV8Internal::windowExposedAttributeAttributeSette r(v8Value, info);
301 } 308 }
302 309
303 static void voidMethodTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo <v8::Value>& info) 310 static void voidMethodTestInterfaceEmptyArgMethod(const v8::FunctionCallbackInfo <v8::Value>& info)
(...skipping 17 matching lines...) Expand all
321 static void voidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCall backInfo<v8::Value>& info) 328 static void voidMethodTestInterfaceEmptyArgMethodCallback(const v8::FunctionCall backInfo<v8::Value>& info)
322 { 329 {
323 TestInterface5ImplementationV8Internal::voidMethodTestInterfaceEmptyArgMetho d(info); 330 TestInterface5ImplementationV8Internal::voidMethodTestInterfaceEmptyArgMetho d(info);
324 } 331 }
325 332
326 static void voidMethodDoubleArgFloatArgMethod(const v8::FunctionCallbackInfo<v8: :Value>& info) 333 static void voidMethodDoubleArgFloatArgMethod(const v8::FunctionCallbackInfo<v8: :Value>& info)
327 { 334 {
328 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD oubleArgFloatArg", "TestInterface5", info.Holder(), info.GetIsolate()); 335 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD oubleArgFloatArg", "TestInterface5", info.Holder(), info.GetIsolate());
329 if (UNLIKELY(info.Length() < 2)) { 336 if (UNLIKELY(info.Length() < 2)) {
330 setMinimumArityTypeError(exceptionState, 2, info.Length()); 337 setMinimumArityTypeError(exceptionState, 2, info.Length());
331 exceptionState.throwIfNeeded();
332 return; 338 return;
333 } 339 }
334 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ; 340 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ;
335 double doubleArg; 341 double doubleArg;
336 float floatArg; 342 float floatArg;
337 { 343 {
338 doubleArg = toRestrictedDouble(info.GetIsolate(), info[0], exceptionStat e); 344 doubleArg = toRestrictedDouble(info.GetIsolate(), info[0], exceptionStat e);
339 if (exceptionState.throwIfNeeded()) 345 if (exceptionState.hadException()) {
340 return; 346 return;
347 }
341 floatArg = toRestrictedFloat(info.GetIsolate(), info[1], exceptionState) ; 348 floatArg = toRestrictedFloat(info.GetIsolate(), info[1], exceptionState) ;
342 if (exceptionState.throwIfNeeded()) 349 if (exceptionState.hadException()) {
343 return; 350 return;
351 }
344 } 352 }
345 impl->voidMethodDoubleArgFloatArg(doubleArg, floatArg); 353 impl->voidMethodDoubleArgFloatArg(doubleArg, floatArg);
346 } 354 }
347 355
348 static void voidMethodDoubleArgFloatArgMethodCallback(const v8::FunctionCallback Info<v8::Value>& info) 356 static void voidMethodDoubleArgFloatArgMethodCallback(const v8::FunctionCallback Info<v8::Value>& info)
349 { 357 {
350 TestInterface5ImplementationV8Internal::voidMethodDoubleArgFloatArgMethod(in fo); 358 TestInterface5ImplementationV8Internal::voidMethodDoubleArgFloatArgMethod(in fo);
351 } 359 }
352 360
353 static void voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethod(const v8:: FunctionCallbackInfo<v8::Value>& info) 361 static void voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethod(const v8:: FunctionCallbackInfo<v8::Value>& info)
354 { 362 {
355 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodU nrestrictedDoubleArgUnrestrictedFloatArg", "TestInterface5", info.Holder(), info .GetIsolate()); 363 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodU nrestrictedDoubleArgUnrestrictedFloatArg", "TestInterface5", info.Holder(), info .GetIsolate());
356 if (UNLIKELY(info.Length() < 2)) { 364 if (UNLIKELY(info.Length() < 2)) {
357 setMinimumArityTypeError(exceptionState, 2, info.Length()); 365 setMinimumArityTypeError(exceptionState, 2, info.Length());
358 exceptionState.throwIfNeeded();
359 return; 366 return;
360 } 367 }
361 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ; 368 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ;
362 double unrestrictedDoubleArg; 369 double unrestrictedDoubleArg;
363 float unrestrictedFloatArg; 370 float unrestrictedFloatArg;
364 { 371 {
365 unrestrictedDoubleArg = toDouble(info.GetIsolate(), info[0], exceptionSt ate); 372 unrestrictedDoubleArg = toDouble(info.GetIsolate(), info[0], exceptionSt ate);
366 if (exceptionState.throwIfNeeded()) 373 if (exceptionState.hadException()) {
367 return; 374 return;
375 }
368 unrestrictedFloatArg = toFloat(info.GetIsolate(), info[1], exceptionStat e); 376 unrestrictedFloatArg = toFloat(info.GetIsolate(), info[1], exceptionStat e);
369 if (exceptionState.throwIfNeeded()) 377 if (exceptionState.hadException()) {
370 return; 378 return;
379 }
371 } 380 }
372 impl->voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg(unrestrictedDouble Arg, unrestrictedFloatArg); 381 impl->voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg(unrestrictedDouble Arg, unrestrictedFloatArg);
373 } 382 }
374 383
375 static void voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethodCallback(co nst v8::FunctionCallbackInfo<v8::Value>& info) 384 static void voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethodCallback(co nst v8::FunctionCallbackInfo<v8::Value>& info)
376 { 385 {
377 TestInterface5ImplementationV8Internal::voidMethodUnrestrictedDoubleArgUnres trictedFloatArgMethod(info); 386 TestInterface5ImplementationV8Internal::voidMethodUnrestrictedDoubleArgUnres trictedFloatArgMethod(info);
378 } 387 }
379 388
380 static void voidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 389 static void voidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 static void windowAndServiceWorkerExposedMethodMethodCallback(const v8::Function CallbackInfo<v8::Value>& info) 480 static void windowAndServiceWorkerExposedMethodMethodCallback(const v8::Function CallbackInfo<v8::Value>& info)
472 { 481 {
473 TestInterface5ImplementationV8Internal::windowAndServiceWorkerExposedMethodM ethod(info); 482 TestInterface5ImplementationV8Internal::windowAndServiceWorkerExposedMethodM ethod(info);
474 } 483 }
475 484
476 static void voidMethodBooleanOrDOMStringArgMethod(const v8::FunctionCallbackInfo <v8::Value>& info) 485 static void voidMethodBooleanOrDOMStringArgMethod(const v8::FunctionCallbackInfo <v8::Value>& info)
477 { 486 {
478 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodB ooleanOrDOMStringArg", "TestInterface5", info.Holder(), info.GetIsolate()); 487 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodB ooleanOrDOMStringArg", "TestInterface5", info.Holder(), info.GetIsolate());
479 if (UNLIKELY(info.Length() < 1)) { 488 if (UNLIKELY(info.Length() < 1)) {
480 setMinimumArityTypeError(exceptionState, 1, info.Length()); 489 setMinimumArityTypeError(exceptionState, 1, info.Length());
481 exceptionState.throwIfNeeded();
482 return; 490 return;
483 } 491 }
484 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ; 492 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ;
485 BooleanOrString arg; 493 BooleanOrString arg;
486 { 494 {
487 V8BooleanOrString::toImpl(info.GetIsolate(), info[0], arg, UnionTypeConv ersionMode::NotNullable, exceptionState); 495 V8BooleanOrString::toImpl(info.GetIsolate(), info[0], arg, UnionTypeConv ersionMode::NotNullable, exceptionState);
488 if (exceptionState.throwIfNeeded()) 496 if (exceptionState.hadException()) {
489 return; 497 return;
498 }
490 } 499 }
491 impl->voidMethodBooleanOrDOMStringArg(arg); 500 impl->voidMethodBooleanOrDOMStringArg(arg);
492 } 501 }
493 502
494 static void voidMethodBooleanOrDOMStringArgMethodCallback(const v8::FunctionCall backInfo<v8::Value>& info) 503 static void voidMethodBooleanOrDOMStringArgMethodCallback(const v8::FunctionCall backInfo<v8::Value>& info)
495 { 504 {
496 TestInterface5ImplementationV8Internal::voidMethodBooleanOrDOMStringArgMetho d(info); 505 TestInterface5ImplementationV8Internal::voidMethodBooleanOrDOMStringArgMetho d(info);
497 } 506 }
498 507
499 static void voidMethodDoubleOrDOMStringArgMethod(const v8::FunctionCallbackInfo< v8::Value>& info) 508 static void voidMethodDoubleOrDOMStringArgMethod(const v8::FunctionCallbackInfo< v8::Value>& info)
500 { 509 {
501 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD oubleOrDOMStringArg", "TestInterface5", info.Holder(), info.GetIsolate()); 510 ExceptionState exceptionState(ExceptionState::ExecutionContext, "voidMethodD oubleOrDOMStringArg", "TestInterface5", info.Holder(), info.GetIsolate());
502 if (UNLIKELY(info.Length() < 1)) { 511 if (UNLIKELY(info.Length() < 1)) {
503 setMinimumArityTypeError(exceptionState, 1, info.Length()); 512 setMinimumArityTypeError(exceptionState, 1, info.Length());
504 exceptionState.throwIfNeeded();
505 return; 513 return;
506 } 514 }
507 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ; 515 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ;
508 DoubleOrString arg; 516 DoubleOrString arg;
509 { 517 {
510 V8DoubleOrString::toImpl(info.GetIsolate(), info[0], arg, UnionTypeConve rsionMode::NotNullable, exceptionState); 518 V8DoubleOrString::toImpl(info.GetIsolate(), info[0], arg, UnionTypeConve rsionMode::NotNullable, exceptionState);
511 if (exceptionState.throwIfNeeded()) 519 if (exceptionState.hadException()) {
512 return; 520 return;
521 }
513 } 522 }
514 impl->voidMethodDoubleOrDOMStringArg(arg); 523 impl->voidMethodDoubleOrDOMStringArg(arg);
515 } 524 }
516 525
517 static void voidMethodDoubleOrDOMStringArgMethodCallback(const v8::FunctionCallb ackInfo<v8::Value>& info) 526 static void voidMethodDoubleOrDOMStringArgMethodCallback(const v8::FunctionCallb ackInfo<v8::Value>& info)
518 { 527 {
519 TestInterface5ImplementationV8Internal::voidMethodDoubleOrDOMStringArgMethod (info); 528 TestInterface5ImplementationV8Internal::voidMethodDoubleOrDOMStringArgMethod (info);
520 } 529 }
521 530
522 static void keysMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 531 static void keysMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
523 { 532 {
524 ExceptionState exceptionState(ExceptionState::ExecutionContext, "keys", "Tes tInterface5", info.Holder(), info.GetIsolate()); 533 ExceptionState exceptionState(ExceptionState::ExecutionContext, "keys", "Tes tInterface5", info.Holder(), info.GetIsolate());
525 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ; 534 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ;
526 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); 535 ScriptState* scriptState = ScriptState::current(info.GetIsolate());
527 Iterator* result = impl->keysForBinding(scriptState, exceptionState); 536 Iterator* result = impl->keysForBinding(scriptState, exceptionState);
528 if (exceptionState.hadException()) { 537 if (exceptionState.hadException()) {
529 exceptionState.throwIfNeeded();
530 return; 538 return;
531 } 539 }
532 v8SetReturnValue(info, result); 540 v8SetReturnValue(info, result);
533 } 541 }
534 542
535 static void keysMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) 543 static void keysMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info)
536 { 544 {
537 TestInterface5ImplementationV8Internal::keysMethod(info); 545 TestInterface5ImplementationV8Internal::keysMethod(info);
538 } 546 }
539 547
540 static void valuesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 548 static void valuesMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
541 { 549 {
542 ExceptionState exceptionState(ExceptionState::ExecutionContext, "values", "T estInterface5", info.Holder(), info.GetIsolate()); 550 ExceptionState exceptionState(ExceptionState::ExecutionContext, "values", "T estInterface5", info.Holder(), info.GetIsolate());
543 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ; 551 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ;
544 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); 552 ScriptState* scriptState = ScriptState::current(info.GetIsolate());
545 Iterator* result = impl->valuesForBinding(scriptState, exceptionState); 553 Iterator* result = impl->valuesForBinding(scriptState, exceptionState);
546 if (exceptionState.hadException()) { 554 if (exceptionState.hadException()) {
547 exceptionState.throwIfNeeded();
548 return; 555 return;
549 } 556 }
550 v8SetReturnValue(info, result); 557 v8SetReturnValue(info, result);
551 } 558 }
552 559
553 static void valuesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info ) 560 static void valuesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info )
554 { 561 {
555 TestInterface5ImplementationV8Internal::valuesMethod(info); 562 TestInterface5ImplementationV8Internal::valuesMethod(info);
556 } 563 }
557 564
558 static void entriesMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 565 static void entriesMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
559 { 566 {
560 ExceptionState exceptionState(ExceptionState::ExecutionContext, "entries", " TestInterface5", info.Holder(), info.GetIsolate()); 567 ExceptionState exceptionState(ExceptionState::ExecutionContext, "entries", " TestInterface5", info.Holder(), info.GetIsolate());
561 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ; 568 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ;
562 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); 569 ScriptState* scriptState = ScriptState::current(info.GetIsolate());
563 Iterator* result = impl->entriesForBinding(scriptState, exceptionState); 570 Iterator* result = impl->entriesForBinding(scriptState, exceptionState);
564 if (exceptionState.hadException()) { 571 if (exceptionState.hadException()) {
565 exceptionState.throwIfNeeded();
566 return; 572 return;
567 } 573 }
568 v8SetReturnValue(info, result); 574 v8SetReturnValue(info, result);
569 } 575 }
570 576
571 static void entriesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf o) 577 static void entriesMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf o)
572 { 578 {
573 TestInterface5ImplementationV8Internal::entriesMethod(info); 579 TestInterface5ImplementationV8Internal::entriesMethod(info);
574 } 580 }
575 581
576 static void forEachMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 582 static void forEachMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
577 { 583 {
578 ExceptionState exceptionState(ExceptionState::ExecutionContext, "forEach", " TestInterface5", info.Holder(), info.GetIsolate()); 584 ExceptionState exceptionState(ExceptionState::ExecutionContext, "forEach", " TestInterface5", info.Holder(), info.GetIsolate());
579 if (UNLIKELY(info.Length() < 1)) { 585 if (UNLIKELY(info.Length() < 1)) {
580 setMinimumArityTypeError(exceptionState, 1, info.Length()); 586 setMinimumArityTypeError(exceptionState, 1, info.Length());
581 exceptionState.throwIfNeeded();
582 return; 587 return;
583 } 588 }
584 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ; 589 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ;
585 ScriptValue callback; 590 ScriptValue callback;
586 ScriptValue thisArg; 591 ScriptValue thisArg;
587 { 592 {
588 if (!info[0]->IsFunction()) { 593 if (!info[0]->IsFunction()) {
589 exceptionState.throwTypeError("The callback provided as parameter 1 is not a function."); 594 exceptionState.throwTypeError("The callback provided as parameter 1 is not a function.");
590 exceptionState.throwIfNeeded();
591 return; 595 return;
592 } 596 }
593 callback = ScriptValue(ScriptState::current(info.GetIsolate()), info[0]) ; 597 callback = ScriptValue(ScriptState::current(info.GetIsolate()), info[0]) ;
594 thisArg = ScriptValue(ScriptState::current(info.GetIsolate()), info[1]); 598 thisArg = ScriptValue(ScriptState::current(info.GetIsolate()), info[1]);
595 } 599 }
596 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); 600 ScriptState* scriptState = ScriptState::current(info.GetIsolate());
597 impl->forEachForBinding(scriptState, ScriptValue(scriptState, info.Holder()) , callback, thisArg, exceptionState); 601 impl->forEachForBinding(scriptState, ScriptValue(scriptState, info.Holder()) , callback, thisArg, exceptionState);
598 if (exceptionState.hadException()) { 602 if (exceptionState.hadException()) {
599 exceptionState.throwIfNeeded();
600 return; 603 return;
601 } 604 }
602 } 605 }
603 606
604 static void forEachMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf o) 607 static void forEachMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& inf o)
605 { 608 {
606 TestInterface5ImplementationV8Internal::forEachMethod(info); 609 TestInterface5ImplementationV8Internal::forEachMethod(info);
607 } 610 }
608 611
609 static void toStringMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 612 static void toStringMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
610 { 613 {
611 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ; 614 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ;
612 v8SetReturnValueString(info, impl->toString(), info.GetIsolate()); 615 v8SetReturnValueString(info, impl->toString(), info.GetIsolate());
613 } 616 }
614 617
615 static void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in fo) 618 static void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in fo)
616 { 619 {
617 TestInterface5ImplementationV8Internal::toStringMethod(info); 620 TestInterface5ImplementationV8Internal::toStringMethod(info);
618 } 621 }
619 622
620 static void iteratorMethod(const v8::FunctionCallbackInfo<v8::Value>& info) 623 static void iteratorMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
621 { 624 {
622 ExceptionState exceptionState(ExceptionState::ExecutionContext, "iterator", "TestInterface5", info.Holder(), info.GetIsolate()); 625 ExceptionState exceptionState(ExceptionState::ExecutionContext, "iterator", "TestInterface5", info.Holder(), info.GetIsolate());
623 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ; 626 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ;
624 ScriptState* scriptState = ScriptState::current(info.GetIsolate()); 627 ScriptState* scriptState = ScriptState::current(info.GetIsolate());
625 Iterator* result = impl->iterator(scriptState, exceptionState); 628 Iterator* result = impl->iterator(scriptState, exceptionState);
626 if (exceptionState.hadException()) { 629 if (exceptionState.hadException()) {
627 exceptionState.throwIfNeeded();
628 return; 630 return;
629 } 631 }
630 v8SetReturnValue(info, result); 632 v8SetReturnValue(info, result);
631 } 633 }
632 634
633 static void iteratorMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in fo) 635 static void iteratorMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& in fo)
634 { 636 {
635 TestInterface5ImplementationV8Internal::iteratorMethod(info); 637 TestInterface5ImplementationV8Internal::iteratorMethod(info);
636 } 638 }
637 639
638 static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo <v8::Value>& info) 640 static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo <v8::Value>& info)
639 { 641 {
640 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ; 642 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ;
641 String result = impl->anonymousIndexedGetter(index); 643 String result = impl->anonymousIndexedGetter(index);
642 if (result.isNull()) 644 if (result.isNull())
643 return; 645 return;
644 v8SetReturnValueString(info, result, info.GetIsolate()); 646 v8SetReturnValueString(info, result, info.GetIsolate());
645 } 647 }
646 648
647 static void indexedPropertyGetterCallback(uint32_t index, const v8::PropertyCall backInfo<v8::Value>& info) 649 static void indexedPropertyGetterCallback(uint32_t index, const v8::PropertyCall backInfo<v8::Value>& info)
648 { 650 {
649 TestInterface5ImplementationV8Internal::indexedPropertyGetter(index, info); 651 TestInterface5ImplementationV8Internal::indexedPropertyGetter(index, info);
650 } 652 }
651 653
652 static void indexedPropertySetter(uint32_t index, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<v8::Value>& info) 654 static void indexedPropertySetter(uint32_t index, v8::Local<v8::Value> v8Value, const v8::PropertyCallbackInfo<v8::Value>& info)
653 { 655 {
654 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ; 656 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ;
655 V8StringResource<> propertyValue = v8Value; 657 V8StringResource<> propertyValue = v8Value;
656 if (!propertyValue.prepare()) 658 if (!propertyValue.prepare()) {
657 return; 659 return;
660 }
658 bool result = impl->anonymousIndexedSetter(index, propertyValue); 661 bool result = impl->anonymousIndexedSetter(index, propertyValue);
659 if (!result) 662 if (!result)
660 return; 663 return;
661 v8SetReturnValue(info, v8Value); 664 v8SetReturnValue(info, v8Value);
662 } 665 }
663 666
664 static void indexedPropertySetterCallback(uint32_t index, v8::Local<v8::Value> v 8Value, const v8::PropertyCallbackInfo<v8::Value>& info) 667 static void indexedPropertySetterCallback(uint32_t index, v8::Local<v8::Value> v 8Value, const v8::PropertyCallbackInfo<v8::Value>& info)
665 { 668 {
666 TestInterface5ImplementationV8Internal::indexedPropertySetter(index, v8Value , info); 669 TestInterface5ImplementationV8Internal::indexedPropertySetter(index, v8Value , info);
667 } 670 }
(...skipping 30 matching lines...) Expand all
698 } 701 }
699 702
700 static void namedPropertySetter(v8::Local<v8::Name> name, v8::Local<v8::Value> v 8Value, const v8::PropertyCallbackInfo<v8::Value>& info) 703 static void namedPropertySetter(v8::Local<v8::Name> name, v8::Local<v8::Value> v 8Value, const v8::PropertyCallbackInfo<v8::Value>& info)
701 { 704 {
702 auto nameString = name.As<v8::String>(); 705 auto nameString = name.As<v8::String>();
703 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ; 706 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ;
704 V8StringResource<> propertyName(nameString); 707 V8StringResource<> propertyName(nameString);
705 if (!propertyName.prepare()) 708 if (!propertyName.prepare())
706 return; 709 return;
707 V8StringResource<> propertyValue = v8Value; 710 V8StringResource<> propertyValue = v8Value;
708 if (!propertyValue.prepare()) 711 if (!propertyValue.prepare()) {
709 return; 712 return;
713 }
710 bool result = impl->anonymousNamedSetter(propertyName, propertyValue); 714 bool result = impl->anonymousNamedSetter(propertyName, propertyValue);
711 if (!result) 715 if (!result)
712 return; 716 return;
713 v8SetReturnValue(info, v8Value); 717 v8SetReturnValue(info, v8Value);
714 } 718 }
715 719
716 static void namedPropertySetterCallback(v8::Local<v8::Name> name, v8::Local<v8:: Value> v8Value, const v8::PropertyCallbackInfo<v8::Value>& info) 720 static void namedPropertySetterCallback(v8::Local<v8::Name> name, v8::Local<v8:: Value> v8Value, const v8::PropertyCallbackInfo<v8::Value>& info)
717 { 721 {
718 if (!name->IsString()) 722 if (!name->IsString())
719 return; 723 return;
720 TestInterface5ImplementationV8Internal::namedPropertySetter(name, v8Value, i nfo); 724 TestInterface5ImplementationV8Internal::namedPropertySetter(name, v8Value, i nfo);
721 } 725 }
722 726
723 static void namedPropertyQuery(v8::Local<v8::Name> name, const v8::PropertyCallb ackInfo<v8::Integer>& info) 727 static void namedPropertyQuery(v8::Local<v8::Name> name, const v8::PropertyCallb ackInfo<v8::Integer>& info)
724 { 728 {
725 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ; 729 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ;
726 AtomicString propertyName = toCoreAtomicString(name.As<v8::String>()); 730 AtomicString propertyName = toCoreAtomicString(name.As<v8::String>());
727 v8::String::Utf8Value namedProperty(name); 731 v8::String::Utf8Value namedProperty(name);
728 ExceptionState exceptionState(ExceptionState::GetterContext, *namedProperty, "TestInterface5", info.Holder(), info.GetIsolate()); 732 ExceptionState exceptionState(ExceptionState::GetterContext, *namedProperty, "TestInterface5", info.Holder(), info.GetIsolate());
729 bool result = impl->namedPropertyQuery(propertyName, exceptionState); 733 bool result = impl->namedPropertyQuery(propertyName, exceptionState);
730 if (exceptionState.throwIfNeeded()) 734 if (exceptionState.hadException())
731 return; 735 return;
732 if (!result) 736 if (!result)
733 return; 737 return;
734 v8SetReturnValueInt(info, v8::None); 738 v8SetReturnValueInt(info, v8::None);
735 } 739 }
736 740
737 static void namedPropertyQueryCallback(v8::Local<v8::Name> name, const v8::Prope rtyCallbackInfo<v8::Integer>& info) 741 static void namedPropertyQueryCallback(v8::Local<v8::Name> name, const v8::Prope rtyCallbackInfo<v8::Integer>& info)
738 { 742 {
739 if (!name->IsString()) 743 if (!name->IsString())
740 return; 744 return;
(...skipping 15 matching lines...) Expand all
756 return; 760 return;
757 TestInterface5ImplementationV8Internal::namedPropertyDeleter(name, info); 761 TestInterface5ImplementationV8Internal::namedPropertyDeleter(name, info);
758 } 762 }
759 763
760 static void namedPropertyEnumerator(const v8::PropertyCallbackInfo<v8::Array>& i nfo) 764 static void namedPropertyEnumerator(const v8::PropertyCallbackInfo<v8::Array>& i nfo)
761 { 765 {
762 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ; 766 TestInterface5Implementation* impl = V8TestInterface5::toImpl(info.Holder()) ;
763 Vector<String> names; 767 Vector<String> names;
764 ExceptionState exceptionState(ExceptionState::EnumerationContext, "TestInter face5", info.Holder(), info.GetIsolate()); 768 ExceptionState exceptionState(ExceptionState::EnumerationContext, "TestInter face5", info.Holder(), info.GetIsolate());
765 impl->namedPropertyEnumerator(names, exceptionState); 769 impl->namedPropertyEnumerator(names, exceptionState);
766 if (exceptionState.throwIfNeeded()) 770 if (exceptionState.hadException())
767 return; 771 return;
768 v8::Local<v8::Array> v8names = v8::Array::New(info.GetIsolate(), names.size( )); 772 v8::Local<v8::Array> v8names = v8::Array::New(info.GetIsolate(), names.size( ));
769 for (size_t i = 0; i < names.size(); ++i) { 773 for (size_t i = 0; i < names.size(); ++i) {
770 if (!v8CallBoolean(v8names->CreateDataProperty(info.GetIsolate()->GetCur rentContext(), i, v8String(info.GetIsolate(), names[i])))) 774 if (!v8CallBoolean(v8names->CreateDataProperty(info.GetIsolate()->GetCur rentContext(), i, v8String(info.GetIsolate(), names[i]))))
771 return; 775 return;
772 } 776 }
773 v8SetReturnValue(info, v8names); 777 v8SetReturnValue(info, v8names);
774 } 778 }
775 779
776 static void namedPropertyEnumeratorCallback(const v8::PropertyCallbackInfo<v8::A rray>& info) 780 static void namedPropertyEnumeratorCallback(const v8::PropertyCallbackInfo<v8::A rray>& info)
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
922 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>( ), prototypeObject, interfaceObject, signature, windowAndServiceWorkerExposedMet hodMethodConfiguration); 926 V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>( ), prototypeObject, interfaceObject, signature, windowAndServiceWorkerExposedMet hodMethodConfiguration);
923 } 927 }
924 } 928 }
925 929
926 ActiveScriptWrappable* V8TestInterface5::toActiveScriptWrappable(v8::Local<v8::O bject> wrapper) 930 ActiveScriptWrappable* V8TestInterface5::toActiveScriptWrappable(v8::Local<v8::O bject> wrapper)
927 { 931 {
928 return toImpl(wrapper); 932 return toImpl(wrapper);
929 } 933 }
930 934
931 } // namespace blink 935 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698