Fix for bug 156772: Replace the pair NS_ADDREF_THIS/NS_RELEASE_THIS by nsCOMPtr<nsIDocumentViewer>

kungFuDeathGrip(this). R=rods, SR=jst


git-svn-id: svn://10.0.0.236/trunk@125018 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
ducarroz%netscape.com 2002-07-11 18:11:12 +00:00
parent 5624070d4e
commit ec3ad73494
2 changed files with 2 additions and 6 deletions

View File

@ -1519,7 +1519,7 @@ DocumentViewerImpl::LoadComplete(nsresult aStatus)
http://bugzilla.mozilla.org/show_bug.cgi?id=78445 for more
explanation.
*/
NS_ADDREF_THIS();
nsCOMPtr<nsIDocumentViewer> kungFuDeathGrip(this);
// Now, fire either an OnLoad or OnError event to the document...
if(NS_SUCCEEDED(aStatus)) {
@ -1560,8 +1560,6 @@ DocumentViewerImpl::LoadComplete(nsresult aStatus)
mPresShell->UnsuppressPainting();
}
NS_RELEASE_THIS();
// Check to see if someone tried to print during the load
if (mPrintIsPending) {
mPrintIsPending = PR_FALSE;

View File

@ -1519,7 +1519,7 @@ DocumentViewerImpl::LoadComplete(nsresult aStatus)
http://bugzilla.mozilla.org/show_bug.cgi?id=78445 for more
explanation.
*/
NS_ADDREF_THIS();
nsCOMPtr<nsIDocumentViewer> kungFuDeathGrip(this);
// Now, fire either an OnLoad or OnError event to the document...
if(NS_SUCCEEDED(aStatus)) {
@ -1560,8 +1560,6 @@ DocumentViewerImpl::LoadComplete(nsresult aStatus)
mPresShell->UnsuppressPainting();
}
NS_RELEASE_THIS();
// Check to see if someone tried to print during the load
if (mPrintIsPending) {
mPrintIsPending = PR_FALSE;