[Webkit-unassigned] [Bug 162530] New: [JSC] ES6 Method functions should not have prototype

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Sep 24 09:53:06 PDT 2016


            Bug ID: 162530
           Summary: [JSC] ES6 Method functions should not have prototype
    Classification: Unclassified
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: caitp at igalia.com

ES6 object literal and class literal Methods, which are not GeneratorMethods and not "constructor" (in classes) incorrectly have a "prototype" property.


({ foo() {} }).foo.prototype // produces an Object with an own property "constructor" whose value is the "foo" function. Should be `undefined`

- Per https://tc39.github.io/ecma262/#sec-method-definitions-runtime-semantics-propertydefinitionevaluation, the "prototype" property should not be added.

This causes test262 failure for test262/test/language/expressions/object/method-definition/name-prototype-prop.js, and likely others

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160924/ff89e274/attachment-0001.html>

More information about the webkit-unassigned mailing list