[Webkit-unassigned] [Bug 162139] REGRESSION(r194387): Crash on github.com in IntlDateTimeFormat::resolvedOptions in C locale

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Sep 21 06:39:33 PDT 2016


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

Michael Catanzaro <mcatanzaro at igalia.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #289442|review?                     |review+
              Flags|                            |

--- Comment #8 from Michael Catanzaro <mcatanzaro at igalia.com> ---
Comment on attachment 289442
  --> https://bugs.webkit.org/attachment.cgi?id=289442
Patch

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

> LayoutTests/js/intl-invalid-locale-crash.html:10
> +if (window.internals) {
> +    window.internals.setUserPreferredLanguages(["a"]);

Please add a comment to indicate that you're doing this to ensure the script gets run with an invalid locale.

> Source/JavaScriptCore/runtime/IntlCollator.cpp:261
> +        throwTypeError(&state, scope, ASCIILiteral("failed to initialize Collator"));

Wouldn't it be good to indicate why? "failed to initialize Collator due to invalid locale"?

> Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp:976
> +    for (size_t i = 0; languageList[i]; ++i) {
> +        // Dot not propagate the C locale to WebCore.

"Do not"

And since you changed the line above anyway, I would change size_t to auto as well.

> Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp:-979
> -    WebCore::languageDidChange();

What, why dropping this? This looks like an accident. Please don't commit without responding to this.

> Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebContext.cpp:491
> +    // When using the C locale, en-US should be used as default.

I would copy/paste this entire block to add a test for POSIX locale as well.

-- 
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/20160921/2e699f59/attachment.html>


More information about the webkit-unassigned mailing list