[Webkit-unassigned] [Bug 27226] Possibly faulty handling of function statements enclosed in other statements (i.e. block, if, etc). JavaScriptCore test ecma_3/FunExpr/fe-001.js failed.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Feb 15 07:22:18 PST 2012


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


Andy Wingo <wingo at igalia.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |wingo at igalia.com




--- Comment #6 from Andy Wingo <wingo at igalia.com>  2012-02-15 07:22:17 PST ---
if (somethingThatIsTrueInMozillaAndWebKit())
>     function foo() { somethingThatOnlyWorksInMozilla(); }
> else
>     function foo() { somethingThatWorksInIEAndWebKit(); }

Keeping the existing webkit behavior in the presence of ES6 block-scoped variables is going to be really suprising to developers.

Can we change things?  We can have FunctionDeclaration still hoist the function and body as before, but add FunctionStatement, with semantics equivalent to var foo = function foo() { ... };.

I understand there are tradeoffs, of course, but we are in time to make life better for future JS developers, when let is the new var.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list