WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
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
Details
Formatted Diff
Diff
Patch
(8.33 KB, patch)
2013-12-09 13:58 PST
,
Laszlo Vidacs
no flags
Details
Formatted Diff
Diff
Patch
(8.27 KB, patch)
2013-12-09 14:22 PST
,
Laszlo Vidacs
no flags
Details
Formatted Diff
Diff
Patch
(8.25 KB, patch)
2013-12-09 15:04 PST
,
Laszlo Vidacs
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Laszlo Vidacs
Comment 1
2013-12-09 05:47:10 PST
Created
attachment 218752
[details]
Patch
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
Created
attachment 218798
[details]
Patch
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
Created
attachment 218799
[details]
Patch
Build Bot
Comment 9
2013-12-09 14:53:24 PST
Comment on
attachment 218799
[details]
Patch
Attachment 218799
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.appspot.com/results/47268185
Build Bot
Comment 10
2013-12-09 15:01:17 PST
Comment on
attachment 218799
[details]
Patch
Attachment 218799
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.appspot.com/results/47248208
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
Comment on
attachment 218799
[details]
Patch
Attachment 218799
[details]
did not pass win-ews (win): Output:
http://webkit-queues.appspot.com/results/47248212
Laszlo Vidacs
Comment 13
2013-12-09 15:04:51 PST
Created
attachment 218806
[details]
Patch
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.
Top of Page
Format For Printing
XML
Clone This Bug