RESOLVED FIXED 92857
[BlackBerry] Favicon should be Base64 encoded for cross-process passing
https://bugs.webkit.org/show_bug.cgi?id=92857
Summary [BlackBerry] Favicon should be Base64 encoded for cross-process passing
Charles Wei
Reported 2012-08-01 02:34:08 PDT
Internal tracking No. 186242 Favicon should be Base64 encoded for cross-process passing to Chrome which is in another process.
Attachments
Patch (4.10 KB, patch)
2012-08-01 04:44 PDT, Charles Wei
no flags
Patch (4.04 KB, patch)
2012-08-01 20:11 PDT, Charles Wei
no flags
Charles Wei
Comment 1 2012-08-01 04:44:25 PDT
Yong Li
Comment 2 2012-08-01 07:13:03 PDT
Comment on attachment 155780 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=155780&action=review r+ otherwise > Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp:1193 > + if (!bitmap->bitmap().empty()) { early return looks better. > Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp:1205 > + Vector<char> out; > + base64Encode(static_cast<const char*>(data->data()), data->size(), out); > + char* buffer = new char[out.size() + 1]; > + memcpy(buffer, out.data(), out.size()); > + buffer[out.size()] = '\0'; out.append('\0') should work, so no need to create a new buffer and memcpy? > Source/WebKit/blackberry/WebCoreSupport/FrameLoaderClientBlackBerry.cpp:1208 > + delete []buffer; "delete[] buffer;" is more clear, if we do need this buffer. From my point of view, Vector<char> always beats new[]/delete[]
George Staikos
Comment 3 2012-08-01 08:02:03 PDT
Comment on attachment 155780 [details] Patch I agree with your comments on the buffer and had this chat with Charles earlier today. r- for these comments in fact.
Charles Wei
Comment 4 2012-08-01 20:11:27 PDT
George Staikos
Comment 5 2012-08-01 20:19:06 PDT
Comment on attachment 155957 [details] Patch Better
Charles Wei
Comment 6 2012-08-01 20:47:08 PDT
Comment on attachment 155957 [details] Patch Thanks, George and Yong, for the comments.
WebKit Review Bot
Comment 7 2012-08-01 20:55:57 PDT
Comment on attachment 155957 [details] Patch Clearing flags on attachment: 155957 Committed r124403: <http://trac.webkit.org/changeset/124403>
WebKit Review Bot
Comment 8 2012-08-01 20:56:01 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.