Persona is no longer an option for authentication on BMO. For more details see Persona Deprecated.
Last Comment Bug 774365 - Web Console setTimeout can't find declared functions by name
: Web Console setTimeout can't find declared functions by name
Product: Firefox
Classification: Client Software
Component: Developer Tools: Console (show other bugs)
: Trunk
: All All
: -- normal (vote)
: Firefox 23
Assigned To: Nobody; OK to take it and work on it
: (Unavailable until Nov 1) Brian Grinstead [:bgrins]
Depends on: 783499
  Show dependency treegraph
Reported: 2012-07-16 10:51 PDT by Michael A. Smith
Modified: 2013-05-14 16:50 PDT (History)
3 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Description Michael A. Smith 2012-07-16 10:51:14 PDT
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:13.0) Gecko/20100101 Firefox/13.0.1
Build ID: 20120614114901

Steps to reproduce:

In Firefox's Web Console I declared a function and then tried to call it in multiple ways:
function foo() { console.log("test"); }

[13:47:37.139] function foo() { console.log("test"); }

[13:47:37.142] undefined
[13:47:39.786] foo()
[13:47:39.788] test @ Web Console:1
[13:47:39.791] undefined
[13:47:45.282] eval("foo()")
[13:47:45.284] test @ Web Console:1
[13:47:45.287] undefined
[13:47:51.746] setTimeout(foo,0)
[13:47:51.748] 5
[13:47:51.752] test @ Web Console:1
[13:47:58.226] setTimeout("foo()",0)
[13:47:58.228] 6
[13:47:58.232] foo is not defined @ Web Console:1

Actual results:

When called with a string first argument (eval syntax), the function was not defined by name in the context of setTimeout.

Expected results:

eval syntax for setTimeout should behave the same as eval itself.
Comment 1 Mihai Sucan [:msucan] 2013-01-24 10:34:33 PST
Thank you for the bug report. This will be fixed by bug 783499.
Comment 2 Mihai Sucan [:msucan] 2013-04-11 08:57:25 PDT
Bug 783499 landed. This is now fixed.

Note You need to log in before you can comment on or make changes to this bug.