WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 64250
58338
ToObject should throw a TypeError on null and undefined
https://bugs.webkit.org/show_bug.cgi?id=58338
Summary
ToObject should throw a TypeError on null and undefined
Erik Arvidsson
Reported
2011-04-12 09:41:01 PDT
The following code snippet should throw a TypeError exception but it returns the global object instead. ({}).valueOf.call(null) 15.2.4.4 Object.prototype.valueOf ( ) ... 1. Let O be the result of calling ToObject passing the this value as the argument. 9.9 ToObject ... Argument Type Result Undefined Throw a TypeError exception. Null Throw a TypeError exception. The same problem occurs in other places like Array.prototype.slice.call(undefined) etc.
Attachments
Add attachment
proposed patch, testcase, etc.
Mark S. Miller
Comment 1
2011-06-08 10:41:14 PDT
Should this be merged with
https://bugs.webkit.org/show_bug.cgi?id=51097
?
Gavin Barraclough
Comment 2
2011-07-20 19:19:01 PDT
*** This bug has been marked as a duplicate of
bug 64250
***
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