[Webkit-unassigned] [Bug 58338] New: ToObject should throw a TypeError on null and undefined
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Apr 12 09:41:01 PDT 2011
https://bugs.webkit.org/show_bug.cgi?id=58338
Summary: ToObject should throw a TypeError on null and
undefined
Product: WebKit
Version: 528+ (Nightly build)
Platform: All
OS/Version: All
Status: NEW
Keywords: ES5
Severity: Normal
Priority: P2
Component: JavaScriptCore
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: arv at chromium.org
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.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list