All the public PL_HashTable* functions that take a PLHashTable* argument crash if it is NULL

RESOLVED WONTFIX

Status

NSPR
NSPR
RESOLVED WONTFIX
8 years ago
8 years ago

People

(Reporter: Nelson Bolyard (seldom reads bugmail), Assigned: Wan-Teh Chang)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

All the public PL_HashTable* functions that take a PLHashTable* argument 
crash if the value of that argument is NULL.  See bug 517615 for example.
It would be a tad nicer if they didn't.
(Assignee)

Comment 1

8 years ago
This is a design decision.  Crashing forces the programming
error to surface and provides a good starting point for
debugging.  Not crashing is more considerate to the users.
There are good arguments for either way.  The current API
reflects the design decision the author made.
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → WONTFIX
Thanks, Wah-Teh.  Now we have that decision on record.
It should probably be documented in the header file.
You need to log in before you can comment on or make changes to this bug.