Closed Bug 914173 Opened 11 years ago Closed 8 years ago

Remove StackFrame::GLOBAL, simplify ExecuteType

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1234845

People

(Reporter: luke, Unassigned)

Details

There used to be a bunch of different JSStackFrame variations pushed by a variety of sites.  Over time, though, we've whittled it down and now every js::StackFrame is either a global or function frame (debugger/eval frames inherit this bit from their caller frame).  We currently have 2 bits to represent these two states which of course allows for bugs where neither is set (bug 847405).

As a further simplification, I suspect we could also collapse the two EVAL and two DEBUG enumerators, leaving just { EXECUTE, EXECUTE_EVAL, EXECUTE_DEBUG } where EVAL/DEBUG either inherit function/global from their evalInFrame or, if !evalInFrame, imply GLOBAL.
Ah, I was a little off on what caused bug 847405, it wasn't forgetting to set one bit or the other, it was that, if !evalInFramePrev, we sniff the top of the stack to determine the frame flags.  Sniffing the top of the stack is almost always the wrong thing to do, so I wonder if we can't remove that behavior.
Assignee: general → nobody
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.