Closed
Bug 760337
Opened 14 years ago
Closed 14 years ago
Add JS_ASSERT(initialized()) where appropriate in HashTable.h
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla16
People
(Reporter: n.nethercote, Assigned: n.nethercote)
Details
Attachments
(1 file)
|
3.46 KB,
patch
|
luke
:
review+
|
Details | Diff | Splinter Review |
Bug 710922 was caused by calling all() on a hash table that hadn't had init() called on it. A |JS_ASSERT(initialized())| assertion inside all() would have caught it immediately. There are probably other places where that assertion would also be helpful.
| Assignee | ||
Comment 1•14 years ago
|
||
This patch adds JS_ASSERT(table) to two sets of HashTable methods.
- The first set definitely need it: findFreeEntry(), add(), two versions of
remove(), all().
- The second set don't need it, but it seems like a good idea just to
encourage people to init() their HashTables immediately: empty(),
count(), capacity(), generation, sizeOf{In,Ex}cludingThis().
Attachment #629675 -
Flags: review?(luke)
Comment 2•14 years ago
|
||
Comment on attachment 629675 [details] [diff] [review]
patch
Looks good
Attachment #629675 -
Flags: review?(luke) → review+
| Assignee | ||
Comment 3•14 years ago
|
||
Target Milestone: --- → mozilla16
Comment 4•14 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•