Remove StackFrame::GLOBAL, simplify ExecuteType

RESOLVED DUPLICATE of bug 1234845

Status

()

Core
JavaScript Engine
RESOLVED DUPLICATE of bug 1234845
5 years ago
2 years ago

People

(Reporter: luke, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

5 years ago
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.
(Reporter)

Comment 1

5 years ago
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)

Updated

4 years ago
Assignee: general → nobody
(Reporter)

Updated

2 years ago
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1234845
You need to log in before you can comment on or make changes to this bug.