[Webkit-unassigned] [Bug 22082] New: typeof should return "object" for RegExps instead of "function"

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Nov 5 06:53:49 PST 2008


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

           Summary: typeof should return "object" for RegExps instead of
                    "function"
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Macintosh
        OS/Version: Mac OS X 10.5
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: mjs at apple.com


JavaScriptCore supports a longstanding Mozilla extension whereby RegExps are
callable. Mozilla decided that despite this typeof should return "object" on
RegExps, otherwise too much other code breaks or gets confused. This is also
proposed as a change for ES3.1. Since Mozilla has already made this change, and
since it would match the typeof return from IE and Opera, we should likely make
this change.

In the future we could also consider removing the callable regexp extension,
since it's not clear if it is needed for Web compatibility and so would let us
remove a strange quirk.


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



More information about the webkit-unassigned mailing list