File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -1516,17 +1516,24 @@ fn abstract_interpret_ops<'gc>(
1516
1516
stack. popn ( activation, num_args) ?;
1517
1517
1518
1518
// Then receiver.
1519
- stack. pop ( activation) ?;
1519
+ let receiver = stack. pop ( activation) ?;
1520
1520
1521
1521
// Remove `super()` calls in classes that extend Object, since they
1522
1522
// are noops anyway.
1523
1523
if num_args == 0 {
1524
1524
let object_class = activation. avm2 ( ) . classes ( ) . object ;
1525
+ // TODO: A `None` `bound_superclass_object` should throw
1526
+ // a VerifyError
1525
1527
if activation
1526
1528
. bound_superclass_object ( )
1527
1529
. is_some_and ( |c| c == object_class)
1528
1530
{
1529
- optimize_op_to ! ( Op :: Pop ) ;
1531
+ // When the receiver is null, this op can still throw an
1532
+ // error, so let's ensure it's guaranteed nonnull before
1533
+ // optimizing it
1534
+ if receiver. not_null ( activation) {
1535
+ optimize_op_to ! ( Op :: Pop ) ;
1536
+ }
1530
1537
}
1531
1538
}
1532
1539
}
You can’t perform that action at this time.
0 commit comments