Closed Bug 662822 Opened 13 years ago Closed 13 years ago

Clarify behavior when EvaluateInFrame introduces new variables

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 662826

People

(Reporter: bhackett1024, Unassigned)

Details

The bytecode, bytecode emitter and the rest of the JS VM have a lot of optimizations which depend on knowing the variables declared by each script.  These will deoptimize appropriately if a direct eval() exists which could introduce new variable bindings, but assume the debugger is not used to EvaluateInFrame and introduce new variable bindings in scripts which do not contain direct eval().

If the EvaluateInFrame does introduce new bindings, it adds a call object and puts the properties there, and whether those properties are actually observed by the running script depends on whether the bytecode name optimizations were used in that script or not.  I don't know what the right thing to do here is (throw an error?), but inconsistently ignoring things doesn't seem like good behavior.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → DUPLICATE
Component: JavaScript Debugging/Profiling APIs → JavaScript Engine
You need to log in before you can comment on or make changes to this bug.