Fix BCP47 language tag validation - extlang and privateuse extension

Extlang subtag can only be preceded by 2 or 3 letter language code.
The length check for the preceding subtag was missing.

In addition, the singleton check for private use extension was buggy.

Add 'USE_CHROMIUM_ICU" to to let v8 take different code paths
depending on whether or not Chromium's ICU with patches is used. This
distinction can be important for Node.js
Bug: v8:8135
Test: v8: test262/intl402/Intl/getCanonicalLocales/*
Change-Id: I431d582ec5b8e730698067d1795b1107dd3d016f
Reviewed-by: Jungshik Shin <>
4 files changed