Closed
Bug 568708
Opened 14 years ago
Closed 14 years ago
Bogus ReferenceError with lambda outliving let-block
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 590006
People
(Reporter: jorendorff, Unassigned)
Details
var f; for (var i = 0; i < 9; i++) { let k = i; f = function() { return k; }; } assertEq(f(), 8); ReferenceError: k is not defined Here f is not a flat closure (for bogus reasons, I think) but it should work anyway. f is just a regular old function, and the opcode that throws is a JSOP_NAME which should find k on the scope chain. Blake had me look, and we think the bug is that TR::scopeChain() never clones Block objects: JS_REQUIRES_STACK LIns* TraceRecorder::scopeChain() { return cx->fp->callee() ? get(&cx->fp->scopeChainVal) : entryScopeChain(); }
Comment 1•14 years ago
|
||
See bug 545759 -- is this (current) bug a dup? /be
Reporter | ||
Comment 2•14 years ago
|
||
Nominating. This bug trips assertions in my brain.
blocking2.0: --- → ?
Reporter | ||
Comment 3•14 years ago
|
||
Well, hang on: the test case passes now. Sorry for the noise. Trying now to find out if anything is really busted here.
Reporter | ||
Updated•14 years ago
|
blocking2.0: ? → ---
Reporter | ||
Comment 4•14 years ago
|
||
Fix identified!
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•