Use dont_AddRef on calls that increment the addref

This commit is contained in:
kipp%netscape.com 1999-02-12 20:13:47 +00:00
Родитель 3e584889b2
Коммит 456ff746d5
2 изменённых файлов: 6 добавлений и 6 удалений

Просмотреть файл

@ -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));

Просмотреть файл

@ -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));