[Webkit-unassigned] [Bug 199138] New: Object.prototype.toString is not spec-perfect

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Jun 23 15:37:58 PDT 2019


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

            Bug ID: 199138
           Summary: Object.prototype.toString is not spec-perfect
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: All
                OS: All
            Status: NEW
          Severity: Minor
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: shvaikalesh at gmail.com

ECMA262: https://tc39.es/ecma262/#sec-object.prototype.tostring
Test262: https://test262.report/browse/built-ins/Object/prototype/toString/proxy-function.js

1. Proxied functions:

```
toString.call(new Proxy(function() {}, {}))
// actual: "[object Object]"
// expected: "[object Function]"
```

2. Proxy constructor:

```
toString.call(Proxy)
// actual: "[object Proxy]"
// expected: "[object Function]"
```

3. Post ES5 built-ins and DOM objects with deleted @@toStringTag are treated specially:

Test262: https://github.com/tc39/test262/pull/2202

```
delete Math[Symbol.toStringTag]
toString.call(Math)
// actual: "[object Math]"
// expected: "[object Object]"
```

4. @@toStringTag symbols are missing on WebAssembly API and DOM objects:

```
document[Symbol.toStringTag]
// actual: undefined
// expected: "HTMLDocument"
```

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190623/3bd4515d/attachment.html>


More information about the webkit-unassigned mailing list