Closed
Bug 940315
Opened 12 years ago
Closed 12 years ago
Don't use a generic hash function to generate database filenames
Categories
(Core :: Storage: IndexedDB, defect)
Core
Storage: IndexedDB
Tracking
()
RESOLVED
FIXED
mozilla28
People
(Reporter: janv, Assigned: vendo)
Details
(Whiteboard: [qa-])
Attachments
(1 file, 1 obsolete file)
|
1.63 KB,
patch
|
janv
:
review+
|
Details | Diff | Splinter Review |
This is a followup for bug 780408.
| Reporter | ||
Comment 1•12 years ago
|
||
Vendo, want to help with this?
| Assignee | ||
Comment 2•12 years ago
|
||
I can try. Thanks. The current hash function has been extracted in patch
Assignee: nobody → vendo.ruzicka
Status: NEW → ASSIGNED
Attachment #8335569 -
Flags: review?(Jan.Varga)
| Reporter | ||
Comment 3•12 years ago
|
||
Comment on attachment 8335569 [details] [diff] [review]
bug940315-fix
Review of attachment 8335569 [details] [diff] [review]:
-----------------------------------------------------------------
Please, double check that HashName() produces the same output as HashString(), thanks.
::: dom/indexedDB/OpenDatabaseHelper.cpp
@@ +66,5 @@
> +inline
> +uint32_t
> +RotateBitsLeft32(uint32_t value)
> +{
> + uint8_t bits = 5;
hm, I don't think it's worth to have this as a constant, convert it to a parameter, please
@@ +77,5 @@
> +{
> + const char16_t* str = aName.BeginReading();
> + size_t length = aName.Length();
> +
> + const uint32_t GoldenRatioU32 = 0x9E3779B9U;
rename it to kGoldenRatioU32 and move after kSQLiteSchemaVersion, please
Attachment #8335569 -
Flags: review?(Jan.Varga)
| Assignee | ||
Comment 4•12 years ago
|
||
updated and output checked by
printf("\n\n\ Names: %d = %d \n", HashName(aName), HashString(aName));
./mach mochitest-plain dom/indexedDB/test/test_open_empty_db.html
Attachment #8335569 -
Attachment is obsolete: true
Attachment #8335899 -
Flags: review?(Jan.Varga)
| Reporter | ||
Comment 5•12 years ago
|
||
Comment on attachment 8335899 [details] [diff] [review]
bug940315-fix
Review of attachment 8335899 [details] [diff] [review]:
-----------------------------------------------------------------
looks good, r=me
Attachment #8335899 -
Flags: review?(Jan.Varga) → review+
| Reporter | ||
Comment 6•12 years ago
|
||
Comment 7•12 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
Updated•12 years ago
|
Whiteboard: [qa-]
You need to log in
before you can comment on or make changes to this bug.
Description
•