Use dont_AddRef on calls that increment the addref

git-svn-id: svn://10.0.0.236/trunk@20615 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
kipp%netscape.com 1999-02-12 20:13:47 +00:00
parent 64a273f287
commit 56889e9bc1
2 changed files with 6 additions and 6 deletions

View File

@ -1459,7 +1459,7 @@ HTMLContentSink::DidBuildModel(PRInt32 aQualityLevel)
// XXX this is silly; who cares?
PRInt32 i, ns = mDocument->GetNumberOfShells();
for (i = 0; i < ns; i++) {
nsCOMPtr<nsIPresShell> shell(mDocument->GetShellAt(i));
nsCOMPtr<nsIPresShell> shell(dont_AddRef(mDocument->GetShellAt(i)));
if (shell) {
nsCOMPtr<nsIViewManager> vm;
nsresult rv = shell->GetViewManager(getter_AddRefs(vm));
@ -1971,7 +1971,7 @@ HTMLContentSink::StartLayout()
PRInt32 i, ns = mDocument->GetNumberOfShells();
for (i = 0; i < ns; i++) {
nsCOMPtr<nsIPresShell> shell(mDocument->GetShellAt(i));
nsCOMPtr<nsIPresShell> shell(dont_AddRef(mDocument->GetShellAt(i)));
if (shell) {
// Make shell an observer for next time
shell->BeginObservingDocument();
@ -2007,7 +2007,7 @@ HTMLContentSink::StartLayout()
// scroll bars.
PRInt32 i, ns = mDocument->GetNumberOfShells();
for (i = 0; i < ns; i++) {
nsCOMPtr<nsIPresShell> shell(mDocument->GetShellAt(i));
nsCOMPtr<nsIPresShell> shell(dont_AddRef(mDocument->GetShellAt(i)));
if (shell) {
nsCOMPtr<nsIViewManager> vm;
shell->GetViewManager(getter_AddRefs(vm));

View File

@ -1459,7 +1459,7 @@ HTMLContentSink::DidBuildModel(PRInt32 aQualityLevel)
// XXX this is silly; who cares?
PRInt32 i, ns = mDocument->GetNumberOfShells();
for (i = 0; i < ns; i++) {
nsCOMPtr<nsIPresShell> shell(mDocument->GetShellAt(i));
nsCOMPtr<nsIPresShell> shell(dont_AddRef(mDocument->GetShellAt(i)));
if (shell) {
nsCOMPtr<nsIViewManager> vm;
nsresult rv = shell->GetViewManager(getter_AddRefs(vm));
@ -1971,7 +1971,7 @@ HTMLContentSink::StartLayout()
PRInt32 i, ns = mDocument->GetNumberOfShells();
for (i = 0; i < ns; i++) {
nsCOMPtr<nsIPresShell> shell(mDocument->GetShellAt(i));
nsCOMPtr<nsIPresShell> shell(dont_AddRef(mDocument->GetShellAt(i)));
if (shell) {
// Make shell an observer for next time
shell->BeginObservingDocument();
@ -2007,7 +2007,7 @@ HTMLContentSink::StartLayout()
// scroll bars.
PRInt32 i, ns = mDocument->GetNumberOfShells();
for (i = 0; i < ns; i++) {
nsCOMPtr<nsIPresShell> shell(mDocument->GetShellAt(i));
nsCOMPtr<nsIPresShell> shell(dont_AddRef(mDocument->GetShellAt(i)));
if (shell) {
nsCOMPtr<nsIViewManager> vm;
shell->GetViewManager(getter_AddRefs(vm));