Clearly separate regular standalone function and event listener
Categories
(Core :: JavaScript Engine, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox87 | --- | fixed |
People
(Reporter: arai, Assigned: arai)
References
Details
Attachments
(3 files)
Currently "standalone function" in frontend means 2 things:
- Function (or generator/async) constructor call
- event handler with possible non-empty non-syntactic scope
treating both of them as "standalone function" sounds confusing,
we should add some new name for event handler case, to clarify what the target function is,
and separate the code for each case.
Assignee | ||
Comment 1•5 years ago
|
||
Compilation except delazification shouldn't access enclosing scope with
environment coordinate.
For eval, we shouldn't search in enclosing scope but just fallback to
either global or dynamic name access.
For other cases, the enclosing scope should be either empty global or null.
Assignee | ||
Comment 2•5 years ago
|
||
To make it clearer that a function with enclosing scope is special, and
different thing than standalone functions (new Function() etc), added dedicate
function/method for it.
Also refactored CreateNonSyntacticEnvironmentChain not to create scope, given
other consumers doesn't need it.
Depends on D103290
Assignee | ||
Comment 3•5 years ago
|
||
Depends on D103291
Comment 5•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/760701eca8bd
https://hg.mozilla.org/mozilla-central/rev/b2990c289595
https://hg.mozilla.org/mozilla-central/rev/8dac478e6727
Description
•