diff --git a/third_party/v8/builtins/array-sort.tq b/third_party/v8/builtins/array-sort.tq index 6c5da6da39..0f6c720646 100644 --- a/third_party/v8/builtins/array-sort.tq +++ b/third_party/v8/builtins/array-sort.tq @@ -325,12 +325,12 @@ module array { builtin CanUseSameAccessor( context: Context, receiver: JSReceiver, initialReceiverMap: Object, initialReceiverLength: Number): Boolean { - const a: JSArray = Cast(receiver) otherwise unreachable; + const a: JSArray = UnsafeCast(receiver); if (a.map != initialReceiverMap) return False; assert(TaggedIsSmi(initialReceiverLength)); let originalLength: Smi = UnsafeCast(initialReceiverLength); - if (a.length != originalLength) return False; + if (UnsafeCast(a.length) != originalLength) return False; return True; }