https://bugzilla.wikimedia.org/show_bug.cgi?id=39542
Web browser: ---
Bug #: 39542
Summary: murmur3() error handling of bad parameters
Product: MediaWiki extensions
Version: master
Platform: All
OS/Version: All
Status: NEW
Severity: minor
Priority: Unprioritized
Component: E3 Experiments
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected],
[email protected]
Classification: Unclassified
Mobile Platform: ---
If you pass a number to murmur3() from lib/murmur3.js it returns 0 (with
default seed=0); if you pass it null/undefined it throws TypeError.
I'm not sure what the E3 Extension's strategy is for handling errors; caller
must validate, return a well-defined error, never fail, throw error, etc. In
this case if we want murmur3 to always return a number it could call
.toString() on numbers before hashing and hash the string "null" or "undefined"
for those values. I'll document the current requirement; let's discuss.
--
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l