(ExecutionContext context, JSObject o)
| 377 | } |
| 378 | |
| 379 | public static boolean isSparse(ExecutionContext context, JSObject o) { |
| 380 | if (!o.hasProperty(context, "length")) { |
| 381 | return false; |
| 382 | } |
| 383 | |
| 384 | long len = Types.toUint32(context, o.get(context, "length")); |
| 385 | |
| 386 | for (long i = 0; i < len; ++i) { |
| 387 | if (o.getOwnProperty(context, "" + i, false) == Types.UNDEFINED) { |
| 388 | return true; |
| 389 | } |
| 390 | } |
| 391 | |
| 392 | return false; |
| 393 | } |
| 394 | |
| 395 | public static Object getValue(ExecutionContext context, Object o) { |
| 396 | if (o instanceof Reference) { |
nothing calls this directly
no test coverage detected