Closed
Bug 547046
Opened 14 years ago
Closed 14 years ago
the proper test whether an object can be called in IsCallable, not VALUE_IS_FUNCTION
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
People
(Reporter: gal, Assigned: gal)
References
Details
(Whiteboard: fixed-in-tracemonkey)
Attachments
(1 file, 1 obsolete file)
7.83 KB,
patch
|
mrbkap
:
review+
|
Details | Diff | Splinter Review |
The following doesn't work: Function.prototype.apply.call(someRegExp, someRegExp, targetString) This also affects other callable objects such as the proposed Harmony proxies.
Assignee | ||
Updated•14 years ago
|
Blocks: harmony:proxies
Comment 1•14 years ago
|
||
Bug 539170 would probably fix this. ES5 says regular expressions are callable? :-(
Updated•14 years ago
|
Summary: TM: the proper test whether an object can be called in IsCallable, not VALUE_IS_FUNCTION → the proper test whether an object can be called in IsCallable, not VALUE_IS_FUNCTION
Comment 2•14 years ago
|
||
(In reply to comment #1) > ES5 says regular expressions are callable? :-( ES5 does not specify a [[Call]] internal method for RegExp -- it's just like ES3. We should see about dropping callable regexps. Not sure how that will go down on the web, since IIRC WebKit followed us. Is there a bug on this? /be
OS: Mac OS X → All
Hardware: x86 → All
Comment 3•14 years ago
|
||
(In reply to comment #0) > The following doesn't work: > > Function.prototype.apply.call(someRegExp, someRegExp, targetString) IOW (followup on comment 2) this is just a handy test, not a normative spec thing. /be
Assignee | ||
Updated•14 years ago
|
Assignee: general → gal
Assignee | ||
Comment 4•14 years ago
|
||
Assignee | ||
Comment 5•14 years ago
|
||
Attachment #427732 -
Attachment is obsolete: true
Assignee | ||
Comment 6•14 years ago
|
||
This fixes the two most obvious offenders. This blocks my proxy work, so I will get it reviewed and landed.
Assignee | ||
Updated•14 years ago
|
Attachment #427733 -
Flags: review?(mrbkap)
Assignee | ||
Comment 7•14 years ago
|
||
Test case with proxies: var proxy = Proxy.createFunction({ invoke: function(obj,name,args) { return Function.prototype[name].apply(obj, args); }, get: function(obj,name) { return Function.prototype[name]; } }, function () { return "ok"; }); print(proxy.call()); should print out "ok", without the patch the result is an error
Updated•14 years ago
|
Attachment #427733 -
Flags: review?(mrbkap) → review+
Assignee | ||
Comment 8•14 years ago
|
||
http://hg.mozilla.org/tracemonkey/rev/16c93a834c66
Whiteboard: fixed-in-tracemonkey
Comment 9•14 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/16c93a834c66
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•