Closed Bug 605891 Opened 14 years ago Closed 8 years ago

Wrong (?) bytecode for local functions within try blocks.

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: bhackett1024, Unassigned)

References

Details

var f;
function test(length)
{
  try
  {
    function f() { }
    f();
  }
  catch(ex)
  {
    print("Threw " + ex);
  }
}
test();

This gives me:

TypeError: f is not a function

V8 and JSC don't throw, which looks like the right behavior to me.  If I disassemble the bytecode, the access to f is a CALLGLOBAL, as if the local is not in scope.
Depends on: 584603
Assignee: general → nobody
No longer reproducible, probably fixed when the new block-Level Function declaration semantics were implemented. Resolving as WFM.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.