Skip to content

Commit

Permalink
Bug 1781061 - Part 0: Do not use Array.from in eager evaluation test.…
Browse files Browse the repository at this point in the history
… r=nchevobbe

`Array.from` on an iterable object internally calls
`%ArrayIteratorPrototype%.next`, which is effectful.

The later patches will add more coverage inside for-of loop inside
self-hosted JS, and that will expose the call on `obj[Symbol.iterator]().next`,
which can be `%ArrayIteratorPrototype%.next` or any other function.

Differential Revision: https://phabricator.services.mozilla.com/D153153
  • Loading branch information
arai-a committed Aug 4, 2022
1 parent eddeebe commit 2b6cd60
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ add_task(async function() {
const cases = [
{ input: "testObj.fun().y", results: ["yay", "yo"] },
{
input: `Array.from([1,2,3]).reduce((i, agg) => agg + i).toS`,
input: `Array.of(1,2,3).reduce((i, agg) => agg + i).toS`,
results: ["toString"],
},
{ input: `1..toE`, results: ["toExponential"] },
Expand Down

0 comments on commit 2b6cd60

Please sign in to comment.