WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
130919
[MSE][Mac] Support lease-renewal.
https://bugs.webkit.org/show_bug.cgi?id=130919
Summary
[MSE][Mac] Support lease-renewal.
Jer Noble
Reported
2014-03-28 16:50:07 PDT
[MSE][Mac] Support lease-renewal.
Attachments
Patch
(2.88 KB, patch)
2014-03-28 16:54 PDT
,
Jer Noble
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Jer Noble
Comment 1
2014-03-28 16:54:58 PDT
Created
attachment 228093
[details]
Patch
WebKit Commit Bot
Comment 2
2014-03-31 09:43:58 PDT
Comment on
attachment 228093
[details]
Patch Clearing flags on attachment: 228093 Committed
r166509
: <
http://trac.webkit.org/changeset/166509
>
WebKit Commit Bot
Comment 3
2014-03-31 09:44:01 PDT
All reviewed patches have been landed. Closing bug.
Darin Adler
Comment 4
2014-03-31 10:01:26 PDT
Comment on
attachment 228093
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=228093&action=review
> Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:116 > + static NeverDestroyed<String> renewMessage("renew"); > + String keyAsString(key->data(), key->length()); > + > + if (keyAsString == renewMessage) {
This is a tortured way to check if the key is "renew". I suggest writing a function to do it without memory allocation. Maybe put it in a header somewhere, but at least do it within this file for now: static bool isEqual(const uint8_t* data, unsigned length, const char* literal) { for (unsigned i = 0; i < length; ++i) { if (data[i] != static_cast<uint8_t>(literal[i])) return false; } return !literal[length]; } Then get rid of the renewMessage and keyAsStringLocal variables. And write: if (isEqual(key->data(), key->length(), "renew") {
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