Bug 130919

Summary: [MSE][Mac] Support lease-renewal.
Product: WebKit Reporter: Jer Noble <jer.noble>
Component: New BugsAssignee: Jer Noble <jer.noble>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, eric.carlson, glenn, philipj, sergio
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

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
Jer Noble
Comment 1 2014-03-28 16:54:58 PDT
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.