| OLD | NEW |
| 1 {% extends 'interface_base.cpp' %} | 1 {% extends 'interface_base.cpp' %} |
| 2 | 2 |
| 3 | 3 |
| 4 {##############################################################################} | 4 {##############################################################################} |
| 5 {% macro attribute_configuration(attribute) %} | 5 {% macro attribute_configuration(attribute) %} |
| 6 {% set getter_callback = | 6 {% set getter_callback = |
| 7 '%sV8Internal::%sAttributeGetterCallback' % | 7 '%sV8Internal::%sAttributeGetterCallback' % |
| 8 (cpp_class, attribute.name) | 8 (cpp_class, attribute.name) |
| 9 if not attribute.constructor_type else | 9 if not attribute.constructor_type else |
| 10 '{0}V8Internal::{0}ConstructorGetter'.format(cpp_class) %} | 10 '{0}V8Internal::{0}ConstructorGetter'.format(cpp_class) %} |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 {% endif %} | 121 {% endif %} |
| 122 {% endblock %} | 122 {% endblock %} |
| 123 | 123 |
| 124 | 124 |
| 125 {##############################################################################} | 125 {##############################################################################} |
| 126 {% block indexed_property_getter %} | 126 {% block indexed_property_getter %} |
| 127 {% if indexed_property_getter and not indexed_property_getter.is_custom %} | 127 {% if indexed_property_getter and not indexed_property_getter.is_custom %} |
| 128 {% set getter = indexed_property_getter %} | 128 {% set getter = indexed_property_getter %} |
| 129 static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo
<v8::Value>& info) | 129 static void indexedPropertyGetter(uint32_t index, const v8::PropertyCallbackInfo
<v8::Value>& info) |
| 130 { | 130 { |
| 131 {{cpp_class}}* collection = {{v8_class}}::toNative(info.Holder()); | 131 {{cpp_class}}* imp = {{v8_class}}::toNative(info.Holder()); |
| 132 {% if getter.is_raises_exception %} | 132 {% if getter.is_raises_exception %} |
| 133 ExceptionState exceptionState(info.Holder(), info.GetIsolate()); | 133 ExceptionState exceptionState(info.Holder(), info.GetIsolate()); |
| 134 {% endif %} | 134 {% endif %} |
| 135 {% set getter_name = getter.name or 'anonymousIndexedGetter' %} | 135 {% set getter_name = getter.name or 'anonymousIndexedGetter' %} |
| 136 {% set getter_arguments = ['index', 'exceptionState'] | 136 {% set getter_arguments = ['index', 'exceptionState'] |
| 137 if getter.is_raises_exception else ['index'] %} | 137 if getter.is_raises_exception else ['index'] %} |
| 138 {{getter.cpp_type}} element = collection->{{getter_name}}({{getter_arguments
|join(', ')}}); | 138 {{getter.cpp_type}} result = imp->{{getter_name}}({{getter_arguments|join(',
')}}); |
| 139 {% if getter.is_raises_exception %} | 139 {% if getter.is_raises_exception %} |
| 140 if (exceptionState.throwIfNeeded()) | 140 if (exceptionState.throwIfNeeded()) |
| 141 return; | 141 return; |
| 142 {% endif %} | 142 {% endif %} |
| 143 if ({{getter.is_null_expression}}) | 143 if ({{getter.is_null_expression}}) |
| 144 return; | 144 return; |
| 145 {{getter.v8_set_return_value}}; | 145 {{getter.v8_set_return_value}}; |
| 146 } | 146 } |
| 147 | 147 |
| 148 {% endif %} | 148 {% endif %} |
| (...skipping 18 matching lines...) Expand all Loading... |
| 167 {% endif %} | 167 {% endif %} |
| 168 {% endblock %} | 168 {% endblock %} |
| 169 | 169 |
| 170 | 170 |
| 171 {##############################################################################} | 171 {##############################################################################} |
| 172 {% block indexed_property_setter %} | 172 {% block indexed_property_setter %} |
| 173 {% if indexed_property_setter and not indexed_property_setter.is_custom %} | 173 {% if indexed_property_setter and not indexed_property_setter.is_custom %} |
| 174 {% set setter = indexed_property_setter %} | 174 {% set setter = indexed_property_setter %} |
| 175 static void indexedPropertySetter(uint32_t index, v8::Local<v8::Value> jsValue,
const v8::PropertyCallbackInfo<v8::Value>& info) | 175 static void indexedPropertySetter(uint32_t index, v8::Local<v8::Value> jsValue,
const v8::PropertyCallbackInfo<v8::Value>& info) |
| 176 { | 176 { |
| 177 {{cpp_class}}* collection = {{v8_class}}::toNative(info.Holder()); | 177 {{cpp_class}}* imp = {{v8_class}}::toNative(info.Holder()); |
| 178 {{setter.v8_value_to_local_cpp_value}}; | 178 {{setter.v8_value_to_local_cpp_value}}; |
| 179 {% if setter.has_exception_state %} | 179 {% if setter.has_exception_state %} |
| 180 ExceptionState exceptionState(info.Holder(), info.GetIsolate()); | 180 ExceptionState exceptionState(info.Holder(), info.GetIsolate()); |
| 181 {% endif %} | 181 {% endif %} |
| 182 {% if setter.has_strict_type_checking %} | 182 {% if setter.has_strict_type_checking %} |
| 183 {# Type checking for interface types (if interface not implemented, throw | 183 {# Type checking for interface types (if interface not implemented, throw |
| 184 TypeError), per http://www.w3.org/TR/WebIDL/#es-interface #} | 184 TypeError), per http://www.w3.org/TR/WebIDL/#es-interface #} |
| 185 if (!isUndefinedOrNull(jsValue) && !V8{{setter.idl_type}}::hasInstance(jsVal
ue, info.GetIsolate())) { | 185 if (!isUndefinedOrNull(jsValue) && !V8{{setter.idl_type}}::hasInstance(jsVal
ue, info.GetIsolate())) { |
| 186 exceptionState.throwTypeError("The provided value is not of type '{{sett
er.idl_type}}'."); | 186 exceptionState.throwTypeError("The provided value is not of type '{{sett
er.idl_type}}'."); |
| 187 exceptionState.throwIfNeeded(); | 187 exceptionState.throwIfNeeded(); |
| 188 return; | 188 return; |
| 189 } | 189 } |
| 190 {% endif %} | 190 {% endif %} |
| 191 {% set setter_name = setter.name or 'anonymousIndexedSetter' %} | 191 {% set setter_name = setter.name or 'anonymousIndexedSetter' %} |
| 192 {% set setter_arguments = ['index', 'propertyValue', 'exceptionState'] | 192 {% set setter_arguments = ['index', 'propertyValue', 'exceptionState'] |
| 193 if setter.is_raises_exception else ['index', 'propertyValue'] %} | 193 if setter.is_raises_exception else ['index', 'propertyValue'] %} |
| 194 bool result = collection->{{setter_name}}({{setter_arguments|join(', ')}}); | 194 bool result = imp->{{setter_name}}({{setter_arguments|join(', ')}}); |
| 195 {% if setter.is_raises_exception %} | 195 {% if setter.is_raises_exception %} |
| 196 if (exceptionState.throwIfNeeded()) | 196 if (exceptionState.throwIfNeeded()) |
| 197 return; | 197 return; |
| 198 {% endif %} | 198 {% endif %} |
| 199 if (!result) | 199 if (!result) |
| 200 return; | 200 return; |
| 201 v8SetReturnValue(info, jsValue); | 201 v8SetReturnValue(info, jsValue); |
| 202 } | 202 } |
| 203 | 203 |
| 204 {% endif %} | 204 {% endif %} |
| (...skipping 18 matching lines...) Expand all Loading... |
| 223 {% endif %} | 223 {% endif %} |
| 224 {% endblock %} | 224 {% endblock %} |
| 225 | 225 |
| 226 | 226 |
| 227 {##############################################################################} | 227 {##############################################################################} |
| 228 {% block indexed_property_deleter %} | 228 {% block indexed_property_deleter %} |
| 229 {% if indexed_property_deleter and not indexed_property_deleter.is_custom %} | 229 {% if indexed_property_deleter and not indexed_property_deleter.is_custom %} |
| 230 {% set deleter = indexed_property_deleter %} | 230 {% set deleter = indexed_property_deleter %} |
| 231 static void indexedPropertyDeleter(uint32_t index, const v8::PropertyCallbackInf
o<v8::Boolean>& info) | 231 static void indexedPropertyDeleter(uint32_t index, const v8::PropertyCallbackInf
o<v8::Boolean>& info) |
| 232 { | 232 { |
| 233 {{cpp_class}}* collection = {{v8_class}}::toNative(info.Holder()); | 233 {{cpp_class}}* imp = {{v8_class}}::toNative(info.Holder()); |
| 234 {% if deleter.is_raises_exception %} | 234 {% if deleter.is_raises_exception %} |
| 235 ExceptionState exceptionState(info.Holder(), info.GetIsolate()); | 235 ExceptionState exceptionState(info.Holder(), info.GetIsolate()); |
| 236 {% endif %} | 236 {% endif %} |
| 237 {% set deleter_name = deleter.name or 'anonymousIndexedDeleter' %} | 237 {% set deleter_name = deleter.name or 'anonymousIndexedDeleter' %} |
| 238 {% set deleter_arguments = ['index', 'exceptionState'] | 238 {% set deleter_arguments = ['index', 'exceptionState'] |
| 239 if deleter.is_raises_exception else ['index'] %} | 239 if deleter.is_raises_exception else ['index'] %} |
| 240 DeleteResult result = collection->{{deleter_name}}({{deleter_arguments|join(
', ')}}); | 240 DeleteResult result = imp->{{deleter_name}}({{deleter_arguments|join(', ')}}
); |
| 241 {% if deleter.is_raises_exception %} | 241 {% if deleter.is_raises_exception %} |
| 242 if (exceptionState.throwIfNeeded()) | 242 if (exceptionState.throwIfNeeded()) |
| 243 return; | 243 return; |
| 244 {% endif %} | 244 {% endif %} |
| 245 if (result != DeleteUnknownProperty) | 245 if (result != DeleteUnknownProperty) |
| 246 return v8SetReturnValueBool(info, result == DeleteSuccess); | 246 return v8SetReturnValueBool(info, result == DeleteSuccess); |
| 247 } | 247 } |
| 248 | 248 |
| 249 {% endif %} | 249 {% endif %} |
| 250 {% endblock %} | 250 {% endblock %} |
| (...skipping 12 matching lines...) Expand all Loading... |
| 263 {{cpp_class}}V8Internal::indexedPropertyDeleter(index, info); | 263 {{cpp_class}}V8Internal::indexedPropertyDeleter(index, info); |
| 264 {% endif %} | 264 {% endif %} |
| 265 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); | 265 TRACE_EVENT_SET_SAMPLING_STATE("V8", "V8Execution"); |
| 266 } | 266 } |
| 267 | 267 |
| 268 {% endif %} | 268 {% endif %} |
| 269 {% endblock %} | 269 {% endblock %} |
| 270 | 270 |
| 271 | 271 |
| 272 {##############################################################################} | 272 {##############################################################################} |
| 273 {% from 'methods.cpp' import union_type_method_call %} |
| 273 {% block named_property_getter %} | 274 {% block named_property_getter %} |
| 274 {% if named_property_getter and not named_property_getter.is_custom %} | 275 {% if named_property_getter and not named_property_getter.is_custom %} |
| 275 {% set getter = named_property_getter %} | 276 {% set getter = named_property_getter %} |
| 276 static void namedPropertyGetter(v8::Local<v8::String> name, const v8::PropertyCa
llbackInfo<v8::Value>& info) | 277 static void namedPropertyGetter(v8::Local<v8::String> name, const v8::PropertyCa
llbackInfo<v8::Value>& info) |
| 277 { | 278 { |
| 278 {% if not is_override_builtins %} | 279 {% if not is_override_builtins %} |
| 279 if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty()) | 280 if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty()) |
| 280 return; | 281 return; |
| 281 if (info.Holder()->HasRealNamedCallbackProperty(name)) | 282 if (info.Holder()->HasRealNamedCallbackProperty(name)) |
| 282 return; | 283 return; |
| 283 if (info.Holder()->HasRealNamedProperty(name)) | 284 if (info.Holder()->HasRealNamedProperty(name)) |
| 284 return; | 285 return; |
| 285 | 286 |
| 286 {% endif %} | 287 {% endif %} |
| 287 {{cpp_class}}* collection = {{v8_class}}::toNative(info.Holder()); | 288 {{cpp_class}}* imp = {{v8_class}}::toNative(info.Holder()); |
| 288 AtomicString propertyName = toCoreAtomicString(name); | 289 AtomicString propertyName = toCoreAtomicString(name); |
| 289 {% if getter.is_raises_exception %} | 290 {% if getter.is_raises_exception %} |
| 290 ExceptionState exceptionState(info.Holder(), info.GetIsolate()); | 291 ExceptionState exceptionState(info.Holder(), info.GetIsolate()); |
| 291 {% endif %} | 292 {% endif %} |
| 292 {% set getter_name = getter.name or 'anonymousNamedGetter' %} | |
| 293 {% set getter_arguments = ['propertyName', 'exceptionState'] | |
| 294 if getter.is_raises_exception else ['propertyName'] %} | |
| 295 {% if getter.union_arguments %} | 293 {% if getter.union_arguments %} |
| 296 {% for cpp_type in getter.cpp_type %} | 294 {{union_type_method_call(getter) | indent}} |
| 297 bool element{{loop.index0}}Enabled = false; | |
| 298 {{cpp_type}} element{{loop.index0}}; | |
| 299 {% endfor %} | |
| 300 {% set getter_arguments = getter_arguments + getter.union_arguments %} | |
| 301 collection->{{getter_name}}({{getter_arguments|join(', ')}}); | |
| 302 {% for v8_set_return_value in getter.v8_set_return_value %} | |
| 303 if (element{{loop.index0}}Enabled) { | |
| 304 {{v8_set_return_value}}; | |
| 305 return; | |
| 306 } | |
| 307 | |
| 308 {% endfor %} | |
| 309 return; | |
| 310 {% else %} | 295 {% else %} |
| 311 {{getter.cpp_type}} element = collection->{{getter_name}}({{getter_arguments
|join(', ')}}); | 296 {{getter.cpp_type}} result = {{getter.cpp_value}}; |
| 312 {% if getter.is_raises_exception %} | 297 {% if getter.is_raises_exception %} |
| 313 if (exceptionState.throwIfNeeded()) | 298 if (exceptionState.throwIfNeeded()) |
| 314 return; | 299 return; |
| 315 {% endif %} | 300 {% endif %} |
| 316 if ({{getter.is_null_expression}}) | 301 if ({{getter.is_null_expression}}) |
| 317 return; | 302 return; |
| 318 {{getter.v8_set_return_value}}; | 303 {{getter.v8_set_return_value}}; |
| 319 {% endif %} | 304 {% endif %} |
| 320 } | 305 } |
| 321 | 306 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 350 { | 335 { |
| 351 {% if not is_override_builtins %} | 336 {% if not is_override_builtins %} |
| 352 if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty()) | 337 if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty()) |
| 353 return; | 338 return; |
| 354 if (info.Holder()->HasRealNamedCallbackProperty(name)) | 339 if (info.Holder()->HasRealNamedCallbackProperty(name)) |
| 355 return; | 340 return; |
| 356 if (info.Holder()->HasRealNamedProperty(name)) | 341 if (info.Holder()->HasRealNamedProperty(name)) |
| 357 return; | 342 return; |
| 358 | 343 |
| 359 {% endif %} | 344 {% endif %} |
| 360 {{cpp_class}}* collection = {{v8_class}}::toNative(info.Holder()); | 345 {{cpp_class}}* imp = {{v8_class}}::toNative(info.Holder()); |
| 361 {# v8_value_to_local_cpp_value('DOMString', 'name', 'propertyName') #} | 346 {# v8_value_to_local_cpp_value('DOMString', 'name', 'propertyName') #} |
| 362 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, propertyName, name)
; | 347 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, propertyName, name)
; |
| 363 {{setter.v8_value_to_local_cpp_value}}; | 348 {{setter.v8_value_to_local_cpp_value}}; |
| 364 {% if setter.has_exception_state %} | 349 {% if setter.has_exception_state %} |
| 365 ExceptionState exceptionState(info.Holder(), info.GetIsolate()); | 350 ExceptionState exceptionState(info.Holder(), info.GetIsolate()); |
| 366 {% endif %} | 351 {% endif %} |
| 367 {% set setter_name = setter.name or 'anonymousNamedSetter' %} | 352 {% set setter_name = setter.name or 'anonymousNamedSetter' %} |
| 368 {% set setter_arguments = | 353 {% set setter_arguments = |
| 369 ['propertyName', 'propertyValue', 'exceptionState'] | 354 ['propertyName', 'propertyValue', 'exceptionState'] |
| 370 if setter.is_raises_exception else | 355 if setter.is_raises_exception else |
| 371 ['propertyName', 'propertyValue'] %} | 356 ['propertyName', 'propertyValue'] %} |
| 372 bool result = collection->{{setter_name}}({{setter_arguments|join(', ')}}); | 357 bool result = imp->{{setter_name}}({{setter_arguments|join(', ')}}); |
| 373 {% if setter.is_raises_exception %} | 358 {% if setter.is_raises_exception %} |
| 374 if (exceptionState.throwIfNeeded()) | 359 if (exceptionState.throwIfNeeded()) |
| 375 return; | 360 return; |
| 376 {% endif %} | 361 {% endif %} |
| 377 if (!result) | 362 if (!result) |
| 378 return; | 363 return; |
| 379 v8SetReturnValue(info, jsValue); | 364 v8SetReturnValue(info, jsValue); |
| 380 } | 365 } |
| 381 | 366 |
| 382 {% endif %} | 367 {% endif %} |
| (...skipping 20 matching lines...) Expand all Loading... |
| 403 | 388 |
| 404 | 389 |
| 405 {##############################################################################} | 390 {##############################################################################} |
| 406 {% block named_property_query %} | 391 {% block named_property_query %} |
| 407 {% if named_property_getter and named_property_getter.is_enumerable and | 392 {% if named_property_getter and named_property_getter.is_enumerable and |
| 408 not named_property_getter.is_custom_property_query %} | 393 not named_property_getter.is_custom_property_query %} |
| 409 {# If there is an enumerator, there MUST be a query method to properly | 394 {# If there is an enumerator, there MUST be a query method to properly |
| 410 communicate property attributes. #} | 395 communicate property attributes. #} |
| 411 static void namedPropertyQuery(v8::Local<v8::String> name, const v8::PropertyCal
lbackInfo<v8::Integer>& info) | 396 static void namedPropertyQuery(v8::Local<v8::String> name, const v8::PropertyCal
lbackInfo<v8::Integer>& info) |
| 412 { | 397 { |
| 413 {{cpp_class}}* collection = {{v8_class}}::toNative(info.Holder()); | 398 {{cpp_class}}* imp = {{v8_class}}::toNative(info.Holder()); |
| 414 AtomicString propertyName = toCoreAtomicString(name); | 399 AtomicString propertyName = toCoreAtomicString(name); |
| 415 ExceptionState exceptionState(info.Holder(), info.GetIsolate()); | 400 ExceptionState exceptionState(info.Holder(), info.GetIsolate()); |
| 416 bool result = collection->namedPropertyQuery(propertyName, exceptionState); | 401 bool result = imp->namedPropertyQuery(propertyName, exceptionState); |
| 417 if (exceptionState.throwIfNeeded()) | 402 if (exceptionState.throwIfNeeded()) |
| 418 return; | 403 return; |
| 419 if (!result) | 404 if (!result) |
| 420 return; | 405 return; |
| 421 v8SetReturnValueInt(info, v8::None); | 406 v8SetReturnValueInt(info, v8::None); |
| 422 } | 407 } |
| 423 | 408 |
| 424 {% endif %} | 409 {% endif %} |
| 425 {% endblock %} | 410 {% endblock %} |
| 426 | 411 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 443 {% endif %} | 428 {% endif %} |
| 444 {% endblock %} | 429 {% endblock %} |
| 445 | 430 |
| 446 | 431 |
| 447 {##############################################################################} | 432 {##############################################################################} |
| 448 {% block named_property_deleter %} | 433 {% block named_property_deleter %} |
| 449 {% if named_property_deleter and not named_property_deleter.is_custom %} | 434 {% if named_property_deleter and not named_property_deleter.is_custom %} |
| 450 {% set deleter = named_property_deleter %} | 435 {% set deleter = named_property_deleter %} |
| 451 static void namedPropertyDeleter(v8::Local<v8::String> name, const v8::PropertyC
allbackInfo<v8::Boolean>& info) | 436 static void namedPropertyDeleter(v8::Local<v8::String> name, const v8::PropertyC
allbackInfo<v8::Boolean>& info) |
| 452 { | 437 { |
| 453 {{cpp_class}}* collection = {{v8_class}}::toNative(info.Holder()); | 438 {{cpp_class}}* imp = {{v8_class}}::toNative(info.Holder()); |
| 454 AtomicString propertyName = toCoreAtomicString(name); | 439 AtomicString propertyName = toCoreAtomicString(name); |
| 455 {% if deleter.is_raises_exception %} | 440 {% if deleter.is_raises_exception %} |
| 456 ExceptionState exceptionState(info.Holder(), info.GetIsolate()); | 441 ExceptionState exceptionState(info.Holder(), info.GetIsolate()); |
| 457 {% endif %} | 442 {% endif %} |
| 458 {% set deleter_name = deleter.name or 'anonymousNamedDeleter' %} | 443 {% set deleter_name = deleter.name or 'anonymousNamedDeleter' %} |
| 459 {% set deleter_arguments = ['propertyName', 'exceptionState'] | 444 {% set deleter_arguments = ['propertyName', 'exceptionState'] |
| 460 if deleter.is_raises_exception else ['propertyName'] %} | 445 if deleter.is_raises_exception else ['propertyName'] %} |
| 461 DeleteResult result = collection->{{deleter_name}}({{deleter_arguments|join(
', ')}}); | 446 DeleteResult result = imp->{{deleter_name}}({{deleter_arguments|join(', ')}}
); |
| 462 {% if deleter.is_raises_exception %} | 447 {% if deleter.is_raises_exception %} |
| 463 if (exceptionState.throwIfNeeded()) | 448 if (exceptionState.throwIfNeeded()) |
| 464 return; | 449 return; |
| 465 {% endif %} | 450 {% endif %} |
| 466 if (result != DeleteUnknownProperty) | 451 if (result != DeleteUnknownProperty) |
| 467 return v8SetReturnValueBool(info, result == DeleteSuccess); | 452 return v8SetReturnValueBool(info, result == DeleteSuccess); |
| 468 } | 453 } |
| 469 | 454 |
| 470 {% endif %} | 455 {% endif %} |
| 471 {% endblock %} | 456 {% endblock %} |
| (...skipping 17 matching lines...) Expand all Loading... |
| 489 {% endif %} | 474 {% endif %} |
| 490 {% endblock %} | 475 {% endblock %} |
| 491 | 476 |
| 492 | 477 |
| 493 {##############################################################################} | 478 {##############################################################################} |
| 494 {% block named_property_enumerator %} | 479 {% block named_property_enumerator %} |
| 495 {% if named_property_getter and named_property_getter.is_enumerable and | 480 {% if named_property_getter and named_property_getter.is_enumerable and |
| 496 not named_property_getter.is_custom_property_enumerator %} | 481 not named_property_getter.is_custom_property_enumerator %} |
| 497 static void namedPropertyEnumerator(const v8::PropertyCallbackInfo<v8::Array>& i
nfo) | 482 static void namedPropertyEnumerator(const v8::PropertyCallbackInfo<v8::Array>& i
nfo) |
| 498 { | 483 { |
| 499 {{cpp_class}}* collection = {{v8_class}}::toNative(info.Holder()); | 484 {{cpp_class}}* imp = {{v8_class}}::toNative(info.Holder()); |
| 500 Vector<String> names; | 485 Vector<String> names; |
| 501 ExceptionState exceptionState(info.Holder(), info.GetIsolate()); | 486 ExceptionState exceptionState(info.Holder(), info.GetIsolate()); |
| 502 collection->namedPropertyEnumerator(names, exceptionState); | 487 imp->namedPropertyEnumerator(names, exceptionState); |
| 503 if (exceptionState.throwIfNeeded()) | 488 if (exceptionState.throwIfNeeded()) |
| 504 return; | 489 return; |
| 505 v8::Handle<v8::Array> v8names = v8::Array::New(info.GetIsolate(), names.size
()); | 490 v8::Handle<v8::Array> v8names = v8::Array::New(info.GetIsolate(), names.size
()); |
| 506 for (size_t i = 0; i < names.size(); ++i) | 491 for (size_t i = 0; i < names.size(); ++i) |
| 507 v8names->Set(v8::Integer::New(info.GetIsolate(), i), v8String(info.GetIs
olate(), names[i])); | 492 v8names->Set(v8::Integer::New(info.GetIsolate(), i), v8String(info.GetIs
olate(), names[i])); |
| 508 v8SetReturnValue(info, v8names); | 493 v8SetReturnValue(info, v8names); |
| 509 } | 494 } |
| 510 | 495 |
| 511 {% endif %} | 496 {% endif %} |
| 512 {% endblock %} | 497 {% endblock %} |
| (...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1314 fromInternalPointer(object)->deref(); | 1299 fromInternalPointer(object)->deref(); |
| 1315 } | 1300 } |
| 1316 | 1301 |
| 1317 template<> | 1302 template<> |
| 1318 v8::Handle<v8::Value> toV8NoInline({{cpp_class}}* impl, v8::Handle<v8::Object> c
reationContext, v8::Isolate* isolate) | 1303 v8::Handle<v8::Value> toV8NoInline({{cpp_class}}* impl, v8::Handle<v8::Object> c
reationContext, v8::Isolate* isolate) |
| 1319 { | 1304 { |
| 1320 return toV8(impl, creationContext, isolate); | 1305 return toV8(impl, creationContext, isolate); |
| 1321 } | 1306 } |
| 1322 | 1307 |
| 1323 {% endblock %} | 1308 {% endblock %} |
| OLD | NEW |