WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WORKSFORME
22082
typeof should return "object" for RegExps instead of "function"
https://bugs.webkit.org/show_bug.cgi?id=22082
Summary
typeof should return "object" for RegExps instead of "function"
Maciej Stachowiak
Reported
2008-11-05 06:53:48 PST
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.
Attachments
Add attachment
proposed patch, testcase, etc.
Cameron Zwarich (cpst)
Comment 1
2009-03-20 08:18:07 PDT
***
Bug 24716
has been marked as a duplicate of this bug. ***
Gavin Barraclough
Comment 2
2011-10-03 13:49:21 PDT
This works for me in ToT
Alexey Proskuryakov
Comment 3
2011-10-04 10:03:40 PDT
Presumably fixed via
bug 28285
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug