The methods IncrementDestroyRefCount and DecrementDestroyRefCount from nsIDocumentViewerPrint (implemented by nsDocumentViewer) are aweful. They claim that there's some sort of reference count with the implication that this reference count will actually keep objects alive. In fact they simply block/unblock the Destroy() call, and we've had serious bugs where the dtor of nsDocumentViewer objects is called, and we then end up accessing a free'd object trying to call Destroy() on it too late. This whole system is aweful and we need to figure out how to replace it, but in the interim we should at least rename these methods so that they don't imply they're doing something they're not.
Attachment #8942768 - Flags: review?(bobowencode) → review+
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/mozilla-inbound/rev/f3d24c21360d Rename the document viewer "DestroyRefCount" member and methods. r=bobowen
You need to log in before you can comment on or make changes to this bug.