Commit 9dfae65
fix: Don't iterate properties in GetImplementedInterfaces
In CallbackHandlers::GetImplementedInterfaces, we were iterating over all
properties of the implementation object (including `super`, which was
problematic for the same reasons as given in the previous commit) but
discarding all of them except `interfaces`. Instead, we can just get the
`interfaces` property if it exists, and use it directly.
A few tweaks in looping over the JS array, as well: we can use
String::NewFromUtf8Literal() to get the name of the `length` property,
we can skip converting the value to an Object before converting it to a
Number (this is equivalent to doing `+arr.length` instead of
`+Object(arr.length)`), and we don't have to explicitly check length > 0
because the loop won't execute if it's 0.1 parent d8b8bc0 commit 9dfae65
1 file changed
+14
-29
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
570 | 570 | | |
571 | 571 | | |
572 | 572 | | |
573 | | - | |
574 | | - | |
575 | | - | |
576 | | - | |
577 | | - | |
578 | | - | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
579 | 577 | | |
580 | | - | |
581 | | - | |
582 | | - | |
583 | | - | |
584 | | - | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
585 | 581 | | |
586 | | - | |
587 | | - | |
588 | | - | |
589 | | - | |
590 | | - | |
591 | | - | |
| 582 | + | |
| 583 | + | |
592 | 584 | | |
593 | | - | |
594 | | - | |
595 | | - | |
| 585 | + | |
| 586 | + | |
596 | 587 | | |
597 | | - | |
598 | | - | |
| 588 | + | |
599 | 589 | | |
600 | | - | |
601 | | - | |
602 | | - | |
603 | | - | |
604 | | - | |
605 | | - | |
606 | | - | |
| 590 | + | |
| 591 | + | |
607 | 592 | | |
608 | 593 | | |
609 | 594 | | |
| |||
0 commit comments