Default constructors and spread operations
Categories
(Core :: JavaScript Engine, task, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox87 | --- | fixed |
People
(Reporter: yulia, Assigned: anba)
References
(Blocks 1 open bug, )
Details
Attachments
(3 files)
delete Array.prototype[Symbol.iterator];
new class extends class {} {}
Running this code causes the default class constructor to be overriden by using Symbol.iterator. The change is to Stops delegating to Array.prototype[Symbol.iterator] in a default class constructor.
Updated•4 years ago
|
Updated•4 years ago
|
Assignee | ||
Comment 1•4 years ago
|
||
When bug 762363 originally added this code, JOF_SPREAD
didn't yet exist, so
instead we used JOF_BYTE
, because the only calls using JOF_BYTE
are spread
calls.
Updated•4 years ago
|
Assignee | ||
Comment 2•4 years ago
|
||
Implement the spread iteration changes from https://github.com/tc39/ecma262/pull/2216.
Default derived class constructors are changed to longer use array iteration
in the spread super call super(...args)
. Instead the contents of the args
array are directly passed through to the super call. In our implementation we
can simply pass the args
rest-array to the super call.
Depends on D104405
Assignee | ||
Comment 3•4 years ago
|
||
Second part of the changes from https://github.com/tc39/ecma262/pull/2216.
The TypeError when calling a class constructor is now spec'ed to originate from
the callee realm, so the error code had to be moved after the AutoRealm
.
Depends on D104406
Comment 5•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/9bbc123e5b38
https://hg.mozilla.org/mozilla-central/rev/e120285e8bb4
https://hg.mozilla.org/mozilla-central/rev/78e57707b124
Description
•