[Webkit-unassigned] [Bug 153679] New: [INTL] Intl Constructors not web compatible with Object.create usage

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jan 29 15:39:24 PST 2016


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

            Bug ID: 153679
           Summary: [INTL] Intl Constructors not web compatible with
                    Object.create usage
    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: thetalecrafter at gmail.com

The second version of ECMA-402 removed the ability to call Collator, DateTimeFormat, and NumberFormat with an already created `this` value to re-initialize. All calls without `new` instead create a new object, instead of trying to initialize an arbitrary `this`.

The new behavior breaks this pattern used in a actual websites:

    var format = Object.create(Intl.NumberFormat.prototype)
    Intl.NumberFormat.apply(format, args)

The 3rd version will likely re-allow this pattern. While arbitrary objects will not possible to initialize as a Collator, DateTimeFormat, or NumberFormat, objects inheriting from these prototypes can be.

The implementation of Intl constructors in WebKit should be made web-compatible and forward-compatible with this pattern.

-- 
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/20160129/47b2fb49/attachment.html>


More information about the webkit-unassigned mailing list