зеркало из https://github.com/mozilla/pjs.git
Use dont_AddRef on calls that increment the addref
This commit is contained in:
Родитель
3e584889b2
Коммит
456ff746d5
|
@ -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));
|
||||
|
|
Загрузка…
Ссылка в новой задаче