Closed
Bug 1283534
Opened 8 years ago
Closed 6 years ago
Debugger.Environment expects all bindings to be aliased on ModuleEnvObject
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
DUPLICATE
of bug 1518308
People
(Reporter: jonco, Unassigned)
References
(Blocks 1 open bug)
Details
As reported by shu on IRC.
From DebugScope::handleUnaliasedAccess:
if (scope->is<ModuleEnvironmentObject>()) {
/* Everything is aliased and stored in the environment object. */
return true;
}
This has not been true since bug 1233109.
Reporter | ||
Comment 1•8 years ago
|
||
I'm trying to write a test to exercise this but I'm having trouble working out how to do it.
From the comments in ScopeObject.cpp it seems like I need to have a DebugScopeObject for a module that is no longer executing. Is that right?
I tried this:
var g = newGlobal();
var dbg = Debugger(g);
var env;
dbg.onDebuggerStatement = function (frame) {
env = frame.environment;
};
g.eval(
`
let m = parseModule(
\`
var a = 1;
debugger;
\`);
m.declarationInstantiation();
m.evaluation();
`);
assertEq(env.getVariable('a'), 1);
I saw a DebugScopeObject being created, but none of the proxy handler methods for it got called and the test passes. Any ideas how to do this?
Flags: needinfo?(shu)
Reporter | ||
Comment 2•7 years ago
|
||
The method in the description is called DebugEnvironmentProxyHandler::handleUnaliasedAccess now.
Reporter | ||
Comment 3•7 years ago
|
||
Jim, do you know how to proceed here? I don't understand how debug scopes work enough to work out how to trigger this.
Flags: needinfo?(jimb)
Reporter | ||
Updated•6 years ago
|
Reporter | ||
Comment 4•6 years ago
|
||
bhackett pointed out that the debugger statement marks all variables in scope as aliased which explains why the test didn't work. The bug itself will be fixed by bug 1518308.
Status: NEW → RESOLVED
Closed: 6 years ago
Flags: needinfo?(jimb)
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•