[Webkit-unassigned] [Bug 141184] REGRESSION: Function declaration inside a function and using the same name as an argument to the containing function no longer takes precedence over the argument

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Feb 3 01:41:39 PST 2015


https://bugs.webkit.org/show_bug.cgi?id=141184

--- Comment #2 from Rob Brackett <rob at robbrackett.com> ---
OK! This took a fair amount of poking before I finally narrowed it down. The cause of the problem I was seeing on Instapaper was actually code in the form:

```
(function(Thing) {
  Thing.whatever = "This breaks.";
  function Thing() {
    // referencing `Thing` in this inner scope here is what does it
    Thing;
  }
})()
```

It seems like referencing `Thing` inside the `Thing` function inside a function with `Thing` as an argument (wow) causes `Thing` in the outer function to reference the argument instead of the function declaration.

As far as what I was seeing with the inspector open, I have no idea whether it was related or completely different. Whether or not the cause is the same, the symptoms are.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150203/0c39ac21/attachment-0002.html>


More information about the webkit-unassigned mailing list