Closed
Bug 940315
Opened 11 years ago
Closed 11 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•11 years ago
|
||
Vendo, want to help with this?
Assignee | ||
Comment 2•11 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•11 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•11 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•11 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•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/8a64e21f0e58
Comment 7•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/8a64e21f0e58
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
Updated•10 years ago
|
Whiteboard: [qa-]
You need to log in
before you can comment on or make changes to this bug.
Description
•