зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1797736 - Part 3: Add testcase for eager evaluation with InitAliasedLexical with hops == 0. r=nchevobbe
Depends on D161018 Differential Revision: https://phabricator.services.mozilla.com/D161019
This commit is contained in:
Родитель
600b589deb
Коммит
418f9387ad
|
@ -41,6 +41,11 @@ add_task(async () => {
|
|||
var originalExec = RegExp.prototype.exec;
|
||||
|
||||
var promptIterable = { [Symbol.iterator]() { return { next: prompt } } };
|
||||
|
||||
function aliasedTest() {
|
||||
const aliased = "ALIASED";
|
||||
return [0].map(() => aliased)[0];
|
||||
}
|
||||
</script>`);
|
||||
|
||||
const commands = await CommandsFactory.forTab(tab);
|
||||
|
@ -251,6 +256,10 @@ async function doSimpleEagerEval(commands) {
|
|||
code: `"abc".match(/a./)[0]`,
|
||||
result: "ab",
|
||||
},
|
||||
{
|
||||
code: "aliasedTest()",
|
||||
result: "ALIASED",
|
||||
},
|
||||
];
|
||||
|
||||
for (const { code, result } of testData) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче