AnnotateCrashReport needs to handle re-setting same key

RESOLVED FIXED

Status

()

Toolkit
Crash Reporting
RESOLVED FIXED
11 years ago
11 years ago

People

(Reporter: ted, Assigned: ted)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

11 years ago
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.
(Assignee)

Comment 1

11 years ago
Created attachment 261902 [details] [diff] [review]
use a hashtable instead

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)

Updated

11 years ago
Attachment #261902 - Flags: first-review?(benjamin) → review?(benjamin)

Comment 2

11 years ago
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+
(Assignee)

Comment 3

11 years ago
Created attachment 262034 [details] [diff] [review]
use nsDataHashtabl

That is indeed better.
Attachment #261902 - Attachment is obsolete: true
(Assignee)

Comment 4

11 years ago
Checked in.
Status: ASSIGNED → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.