Bug 161672 - [INTL] some valid language tags cause errors in Intl constructors
Summary: [INTL] some valid language tags cause errors in Intl constructors
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andy VanWagoner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-06 20:37 PDT by Andy VanWagoner
Modified: 2016-09-07 15:03 PDT (History)
7 users (show)

See Also:


Attachments
Patch (16.11 KB, patch)
2016-09-07 07:40 PDT, Andy VanWagoner
no flags Details | Formatted Diff | Diff
Patch (16.24 KB, patch)
2016-09-07 10:02 PDT, Andy VanWagoner
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andy VanWagoner 2016-09-06 20:37:21 PDT
The tests for language tag handling in the kangax compat tables[1][2] fail in JSC on some valid language tags:

cmn-hans-cn-t-ca-u-ca-x-t-u
aa-a-foo-x-a-foo-bar
x-en-u-foo
x-en-u-foo-u-bar

Implementations in Firefox, Chrome, and Edge pass these tests.

[1] http://kangax.github.io/compat-table/esintl/
[2] https://github.com/tc39/test262/blob/83b07ff15eadb141c3d6f4d236a8733b720041d2/test/intl402/6.2.2_a.js
Comment 1 Andy VanWagoner 2016-09-07 06:27:12 PDT
I know where the problem is, and can submit a patch for this.
Comment 2 Andy VanWagoner 2016-09-07 07:40:34 PDT
Created attachment 288135 [details]
Patch
Comment 3 Mark Lam 2016-09-07 09:00:14 PDT
Comment on attachment 288135 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=288135&action=review

r=me

> Source/JavaScriptCore/ChangeLog:8
> +        Fix private use tag parsing to match spec, allowing single character parts.

If it's handy, I suggest quoting the relevant part of the spec here, or providing a url to it.
Comment 4 Andy VanWagoner 2016-09-07 10:02:37 PDT
Created attachment 288154 [details]
Patch
Comment 5 Andy VanWagoner 2016-09-07 10:03:20 PDT
(In reply to comment #3)
> Comment on attachment 288135 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=288135&action=review
> 
> r=me
> 
> > Source/JavaScriptCore/ChangeLog:8
> > +        Fix private use tag parsing to match spec, allowing single character parts.
> 
> If it's handy, I suggest quoting the relevant part of the spec here, or
> providing a url to it.

done. Is this format ok?
Comment 6 Mark Lam 2016-09-07 13:06:41 PDT
Comment on attachment 288154 [details]
Patch

r=me
Comment 7 WebKit Commit Bot 2016-09-07 15:03:39 PDT
Comment on attachment 288154 [details]
Patch

Clearing flags on attachment: 288154

Committed r205568: <http://trac.webkit.org/changeset/205568>
Comment 8 WebKit Commit Bot 2016-09-07 15:03:44 PDT
All reviewed patches have been landed.  Closing bug.