| 467 | } |
| 468 | |
| 469 | int VariantUtilities::GetArrayLength(IDispatch* array_dispatch, long* length) { |
| 470 | LOG(TRACE) << "Entering Script::GetArrayLength"; |
| 471 | CComVariant length_result; |
| 472 | bool get_length_success = GetVariantObjectPropertyValue(array_dispatch, |
| 473 | L"length", |
| 474 | &length_result); |
| 475 | if (!get_length_success) { |
| 476 | // Failure already logged by GetVariantObjectPropertyValue |
| 477 | return EUNEXPECTEDJSERROR; |
| 478 | } |
| 479 | |
| 480 | *length = length_result.lVal; |
| 481 | return WD_SUCCESS; |
| 482 | } |
| 483 | |
| 484 | int VariantUtilities::GetArrayItem(IDispatch* array_dispatch, |
| 485 | long index, |