| 479 | } |
| 480 | |
| 481 | size_t jsArrayGetLength(IJavaScriptContext& jsContext, const JSValue& jsValue, JSExceptionTracker& exceptionTracker) { |
| 482 | static auto kLength = STRING_LITERAL("length"); |
| 483 | |
| 484 | auto length = jsContext.getObjectProperty(jsValue, jsContext.getPropertyNameCached(kLength), exceptionTracker); |
| 485 | if (!exceptionTracker) { |
| 486 | return 0; |
| 487 | } |
| 488 | |
| 489 | return static_cast<size_t>(jsContext.valueToInt(length.get(), exceptionTracker)); |
| 490 | } |
| 491 | |
| 492 | Value jsArrayToValue(IJavaScriptContext& jsContext, |
| 493 | const JSValue& jsValue, |
no test coverage detected