Closed
Description
I'm having trouble reviewing what GetDirectiveContext is doing. It seems to make some unstated assumptions about what happens to be on the execution context stack at the time it is called. I can't tell whether that matches the lexical scope for all of the possible call paths and whether that will continue to be the case in the future.
Assuming that GetDirectiveContext does produce lexical scoping, its current implementation is broken because it only looks up one level. Consider the code:
function A() {
"hide implementation";
return function B() {
...
return function C() {...}
}
}
Function A's implementation will be hidden (via step 5 of FunctionInitialize), as will function B's (via GetDirectiveContext and step 7b of FunctionInitialize). However, function C's implementation will not be hidden. This seems strange.
Metadata
Metadata
Assignees
Labels
No labels