Fix Array.p.pop() for read-only length 0
Array.prototype.pop() must throw a TypeError whenever the array's length is readonly; there is no exception to that when the length is 0. This patch moves the length==0 special case after the read- only length check in both fast paths (CSA and C++). Fixed: v8:10908 Change-Id: I4a77439478cffeaf11022ff8beb78b0a907290d2 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2440576 Auto-Submit: Jakob Kummerow <jkummerow@chromium.org> Commit-Queue: Toon Verwaest <verwaest@chromium.org> Reviewed-by: Toon Verwaest <verwaest@chromium.org> Cr-Commit-Position: refs/heads/master@{#70233}
Showing
Please
register
or
sign in
to comment