Closed Bug 376545 Opened 17 years ago Closed 17 years ago

AnnotateCrashReport needs to handle re-setting same key

Categories

(Toolkit :: Crash Reporting, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: ted, Assigned: ted)

References

Details

Attachments

(1 file, 1 obsolete file)

Currently AnnotateCrashReport is stupid, and just appends data to a string when it gets called.  If we're going to use it for something that changes a lot (like bug 375083), it will need to be a bit smarter and replace existing entries.
Attached patch use a hashtable instead (obsolete) — Splinter Review
This uses a hashtable to store the API data, and rebuilds the file contents string every time new data is appended.  I looked into adding a unit test for this, but I couldn't get it working right.
Attachment #261902 - Flags: first-review?(benjamin)
Attachment #261902 - Flags: first-review?(benjamin) → review?(benjamin)
Comment on attachment 261902 [details] [diff] [review]
use a hashtable instead

I think you want nsDataHashtable, not nsClassHashtable (no need to separately allocate all the strings). r=me with that change
Attachment #261902 - Flags: review?(benjamin) → review+
That is indeed better.
Attachment #261902 - Attachment is obsolete: true
Checked in.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: