WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
201021
Add missing exception check in canonicalizeLocaleList
https://bugs.webkit.org/show_bug.cgi?id=201021
Summary
Add missing exception check in canonicalizeLocaleList
Justin Michaud
Reported
2019-08-21 19:13:48 PDT
Add missing exception check in canonicalizeLocaleList
Attachments
Patch
(3.35 KB, patch)
2019-08-21 19:14 PDT
,
Justin Michaud
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Justin Michaud
Comment 1
2019-08-21 19:14:16 PDT
Created
attachment 376965
[details]
Patch
Justin Michaud
Comment 2
2019-08-21 19:15:27 PDT
<
rdar://54456311
>
Mark Lam
Comment 3
2019-08-21 19:17:25 PDT
Comment on
attachment 376965
[details]
Patch r=me
WebKit Commit Bot
Comment 4
2019-08-22 11:18:11 PDT
Comment on
attachment 376965
[details]
Patch Clearing flags on attachment: 376965 Committed
r249020
: <
https://trac.webkit.org/changeset/249020
>
WebKit Commit Bot
Comment 5
2019-08-22 11:18:12 PDT
All reviewed patches have been landed. Closing bug.
Darin Adler
Comment 6
2019-08-22 16:39:16 PDT
Comment on
attachment 376965
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=376965&action=review
> Source/JavaScriptCore/runtime/IntlObject.cpp:552 > JSString* tag = kValue.toString(&state); > RETURN_IF_EXCEPTION(scope, Vector<String>()); > > - String canonicalizedTag = canonicalizeLanguageTag(tag->value(&state)); > + auto tagValue = tag->value(&state);
Better idiom for this is toWTFString.
Mark Lam
Comment 7
2019-08-22 16:59:35 PDT
Comment on
attachment 376965
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=376965&action=review
>> Source/JavaScriptCore/runtime/IntlObject.cpp:552 >> + auto tagValue = tag->value(&state); > > Better idiom for this is toWTFString.
toWTFString() doesn't help here. We already know that the tag is a JSString above. toWTFString() would do a lot of busy work before calling JSString::value() anyway. If your proposal is to replace the toString() call above also, then that would not work because it does not handle exceptions generated by the toString(). Basically, toWTFString() has this issue in general.
Darin Adler
Comment 8
2019-08-22 17:23:03 PDT
Comment on
attachment 376965
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=376965&action=review
>>> Source/JavaScriptCore/runtime/IntlObject.cpp:552 >>> + auto tagValue = tag->value(&state); >> >> Better idiom for this is toWTFString. > > toWTFString() doesn't help here. We already know that the tag is a JSString above. toWTFString() would do a lot of busy work before calling JSString::value() anyway. If your proposal is to replace the toString() call above also, then that would not work because it does not handle exceptions generated by the toString(). Basically, toWTFString() has this issue in general.
Yes, I meant replace the toString above. You’re saying that toWTFString doesn’t handle exceptions generated by toString correctly!? That must be fixed or we have to remove toWTFString!
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug