WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 209094
TextTrackBase should validate language before setting m_validBCP47Language
https://bugs.webkit.org/show_bug.cgi?id=209094
Summary
TextTrackBase should validate language before setting m_validBCP47Language
Eric Carlson
Reported
2020-03-13 16:42:28 PDT
TextTrackBase should validate language before setting m_validBCP47Language
Attachments
Patch
(11.52 KB, patch)
2020-03-16 15:38 PDT
,
Eric Carlson
no flags
Details
Formatted Diff
Diff
Patch
(11.85 KB, patch)
2020-03-16 16:37 PDT
,
Eric Carlson
no flags
Details
Formatted Diff
Diff
Patch
(11.89 KB, patch)
2020-03-17 09:54 PDT
,
Eric Carlson
no flags
Details
Formatted Diff
Diff
Address post-review comments
(1.80 KB, patch)
2020-03-17 14:36 PDT
,
Eric Carlson
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2020-03-13 16:42:39 PDT
<
rdar://problem/60439603
>
Eric Carlson
Comment 2
2020-03-16 15:38:40 PDT
Created
attachment 393694
[details]
Patch
Eric Carlson
Comment 3
2020-03-16 16:37:59 PDT
Created
attachment 393706
[details]
Patch
Eric Carlson
Comment 4
2020-03-17 09:54:24 PDT
Created
attachment 393762
[details]
Patch
Jer Noble
Comment 5
2020-03-17 11:59:58 PDT
Comment on
attachment 393762
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=393762&action=review
> Source/WebCore/testing/Internals.cpp:3776 > + return String { track.validBCP47Language() };
nit: this could be: return track.validBCP47Language().string();
WebKit Commit Bot
Comment 6
2020-03-17 13:52:05 PDT
Comment on
attachment 393762
[details]
Patch Clearing flags on attachment: 393762 Committed
r258587
: <
https://trac.webkit.org/changeset/258587
>
WebKit Commit Bot
Comment 7
2020-03-17 13:52:06 PDT
All reviewed patches have been landed. Closing bug.
Darin Adler
Comment 8
2020-03-17 13:53:22 PDT
Comment on
attachment 393762
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=393762&action=review
> Source/WebCore/html/track/TrackBase.cpp:156 > + StringBuilder stringBuilder; > + stringBuilder.appendLiteral("The language '"); > + stringBuilder.append(language); > + stringBuilder.appendLiteral("' is not a valid BCP 47 language tag."); > + message = stringBuilder.toString();
This should be makeString. No reason to use StringBuilder here.
Eric Carlson
Comment 9
2020-03-17 14:14:13 PDT
(In reply to Darin Adler from
comment #8
)
> Comment on
attachment 393762
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=393762&action=review
> > > Source/WebCore/html/track/TrackBase.cpp:156 > > + StringBuilder stringBuilder; > > + stringBuilder.appendLiteral("The language '"); > > + stringBuilder.append(language); > > + stringBuilder.appendLiteral("' is not a valid BCP 47 language tag."); > > + message = stringBuilder.toString(); > > This should be makeString. No reason to use StringBuilder here.
You're right, I should have thought of that when I refactored the code. I'll do that in a follow up.
Eric Carlson
Comment 10
2020-03-17 14:36:06 PDT
Reopening to attach new patch.
Eric Carlson
Comment 11
2020-03-17 14:36:07 PDT
Created
attachment 393790
[details]
Address post-review comments
Darin Adler
Comment 12
2020-03-17 14:57:47 PDT
Comment on
attachment 393762
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=393762&action=review
>>> Source/WebCore/html/track/TrackBase.cpp:156 >>> + message = stringBuilder.toString(); >> >> This should be makeString. No reason to use StringBuilder here. > > You're right, I should have thought of that when I refactored the code. I'll do that in a follow up.
I know you were just moving code around, and I didn’t mean to come on too strong. Thanks for tweaking it!
Eric Carlson
Comment 13
2020-03-17 14:59:57 PDT
(In reply to Darin Adler from
comment #12
)
> Comment on
attachment 393762
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=393762&action=review
> > >>> Source/WebCore/html/track/TrackBase.cpp:156 > >>> + message = stringBuilder.toString(); > >> > >> This should be makeString. No reason to use StringBuilder here. > > > > You're right, I should have thought of that when I refactored the code. I'll do that in a follow up. > > I know you were just moving code around, and I didn’t mean to come on too > strong. Thanks for tweaking it!
No offense taken, it is a great suggestion!
WebKit Commit Bot
Comment 14
2020-03-17 15:45:22 PDT
Comment on
attachment 393790
[details]
Address post-review comments Clearing flags on attachment: 393790 Committed
r258606
: <
https://trac.webkit.org/changeset/258606
>
WebKit Commit Bot
Comment 15
2020-03-17 15:45:24 PDT
All reviewed patches have been landed. Closing bug.
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