Open Bug 1195486 Opened 10 years ago Updated 3 years ago

Convert nsConsoleService member-variable "mMessages" to use smart pointers for safety

Categories

(Core :: XPCOM, defect)

defect

Tracking

()

Tracking Status
firefox43 --- affected

People

(Reporter: dholbert, Unassigned)

Details

nsConsoleService has a member-variable... nsIConsoleMessage** mMessages; ...whose members we NS_ADDREF and NS_RELEASE manually as we modify the array: http://mxr.mozilla.org/mozilla-central/search?string=NS_ADDREF&find=nsConsoleService http://mxr.mozilla.org/mozilla-central/search?string=NS_RELEASE&find=nsConsoleService We should use smart pointers here instead, to manage the refcount for us and avoid accidental mis-addref'ing. (This member-variable should really have type nsCOMArray<nsIConsoleMessage>, or nsTArray<nsCOMPtr<nsIConsoleMessage>>.)
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.