RESOLVED FIXED 125446
Store SHA1 hash in std::array.
https://bugs.webkit.org/show_bug.cgi?id=125446
Summary Store SHA1 hash in std::array.
Laszlo Vidacs
Reported 2013-12-09 05:26:00 PST
Request from https://bugs.webkit.org/show_bug.cgi?id=125345 Use std::array for hash instead of custom Vector implementation.
Attachments
Patch (8.32 KB, patch)
2013-12-09 05:47 PST, Laszlo Vidacs
no flags
Patch (8.33 KB, patch)
2013-12-09 13:58 PST, Laszlo Vidacs
no flags
Patch (8.27 KB, patch)
2013-12-09 14:22 PST, Laszlo Vidacs
no flags
Patch (8.25 KB, patch)
2013-12-09 15:04 PST, Laszlo Vidacs
no flags
Laszlo Vidacs
Comment 1 2013-12-09 05:47:10 PST
Anders Carlsson
Comment 2 2013-12-09 10:30:46 PST
Comment on attachment 218752 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=218752&action=review > Source/WTF/wtf/SHA1.h:61 > + // Size of the SHA1 hash > + WTF_EXPORT_PRIVATE static const size_t hashSize = 20; how about we add typedef std::array<uint8_t, hashSize> Digest; here - then we don’t have to use hashSize everywhere. Patch looks good otherwise.
Laszlo Vidacs
Comment 3 2013-12-09 13:58:34 PST
Laszlo Vidacs
Comment 4 2013-12-09 14:01:12 PST
Thanks for the improvement, also removed some obsolete comments from SHA1.h
Darin Adler
Comment 5 2013-12-09 14:02:00 PST
Comment on attachment 218798 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=218798&action=review > Source/WTF/wtf/SHA1.cpp:95 > + // array not initialized, need to update all positions True, yet not really a helpful comment. Nor in the format we use for comments in WebKit.
Laszlo Vidacs
Comment 6 2013-12-09 14:15:14 PST
Right; I wrote that comment when digest.clear() was deleted. Is it better to remove it?
Darin Adler
Comment 7 2013-12-09 14:19:04 PST
(In reply to comment #6) > Right; I wrote that comment when digest.clear() was deleted. Is it better to remove it? I think it would be slightly better, yes.
Laszlo Vidacs
Comment 8 2013-12-09 14:22:11 PST
Build Bot
Comment 9 2013-12-09 14:53:24 PST
Build Bot
Comment 10 2013-12-09 15:01:17 PST
Darin Adler
Comment 11 2013-12-09 15:01:57 PST
Comment on attachment 218799 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=218799&action=review > Source/WTF/wtf/SHA1.h:64 > + WTF_EXPORT_PRIVATE typedef std::array<uint8_t, hashSize> Digest; There’s no need to export a typedef, and that’s what caused the build failure. Remove this WTF_EXPORT_PRIVATE.
Build Bot
Comment 12 2013-12-09 15:04:09 PST
Laszlo Vidacs
Comment 13 2013-12-09 15:04:51 PST
Laszlo Vidacs
Comment 14 2013-12-10 15:40:02 PST
Could someone take a quick look at the final version of the patch?
WebKit Commit Bot
Comment 15 2013-12-11 14:28:03 PST
Comment on attachment 218806 [details] Patch Clearing flags on attachment: 218806 Committed r160456: <http://trac.webkit.org/changeset/160456>
WebKit Commit Bot
Comment 16 2013-12-11 14:28:06 PST
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.