Closed Bug 619096 Opened 11 years ago Closed 11 years ago

nsMemoryReporterManager should be threadsafe

Categories

(Core :: XPCOM, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: dougt, Assigned: dougt)

References

Details

Attachments

(1 file)

In bug 615978, I really wanted to report sqlite memory usage.  I was adding reporters on a non-main thread.  Doing it any other way is a harder.  Ideally, any thread could add, remove, and enumerate the reporters.

This patch basically locks the array and protects mRefCount.
Attached patch patch v.1Splinter Review
Attachment #497523 - Flags: review?(vladimir)
Comment on attachment 497523 [details] [diff] [review]
patch v.1

looks good!
Attachment #497523 - Flags: review?(vladimir) → review+
Blocks: 615978
Attachment #497523 - Flags: approval2.0?
Attachment #497523 - Flags: approval2.0? → approval2.0+
http://hg.mozilla.org/mozilla-central/rev/398c0e73be64
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.