Bug 6179 - We treat "char" as a reserved word in JavaScript and firefox/IE do not
Summary: We treat "char" as a reserved word in JavaScript and firefox/IE do not
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P4 Normal
Assignee: Geoffrey Garen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-21 01:42 PST by Eric Seidel (no email)
Modified: 2007-02-01 06:46 PST (History)
4 users (show)

See Also:


Attachments
testcase (382 bytes, text/html)
2005-12-21 01:43 PST, Eric Seidel (no email)
no flags Details
Fix (11.68 KB, patch)
2006-05-15 19:48 PDT, Geoffrey Garen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2005-12-21 01:42:35 PST
We treat "class" as a reserved word in JavaScript and firefox does not
Comment 1 Eric Seidel (no email) 2005-12-21 01:43:27 PST
Created attachment 5200 [details]
testcase
Comment 2 Eric Seidel (no email) 2005-12-21 01:58:02 PST
This looks to be a bug in FireFox, not in Safari.  Filed as:
https://bugzilla.mozilla.org/show_bug.cgi?id=321079
Comment 3 Eric Seidel (no email) 2005-12-21 10:43:09 PST
Actually, let's reopen this, as there are several reserved words which both IE and firefox allow, yet we do 
not.

FireFox has a bug which they originally fixed for this:
https://bugzilla.mozilla.org/show_bug.cgi?id=240317

And a test case:
https://bugzilla.mozilla.org/attachment.cgi?id=206492&action=view

As part of the bug which I filed their they are looking to update their behavior to better match IE, which 
we should also consider:
https://bugzilla.mozilla.org/show_bug.cgi?id=321079
Comment 4 Maks Orlovich 2006-02-28 20:39:17 PST
KDE bug #120925 (http://bugs.kde.org/show_bug.cgi?id=120925) is basically about this; it affects http://www.orange.co.il/catalog/

The keywords there are "goto" and "package"
Comment 5 Francisco Tolmasky 2006-03-13 05:28:26 PST
I don't know about char, but I believe class is supposed to be reserved for "later use".
Comment 6 Geoffrey Garen 2006-05-15 17:52:45 PDT
FF reserves no "future reserved words" and the Mozilla Bugzilla entry suggests they don't plan on changing.

IE reserves the following "future reserved words": class, enum, extends, super, export, import.
Comment 7 Geoffrey Garen 2006-05-15 19:48:51 PDT
Created attachment 8339 [details]
Fix

Posting patch for posterity -- Maciej already reviewed it.
Comment 8 Geoffrey Garen 2006-05-15 19:50:40 PDT
Landed as r14403.
Comment 9 Alexey Proskuryakov 2007-02-01 06:46:29 PST
*** Bug 12527 has been marked as a duplicate of this bug. ***