From f54f8327027ccc2883fbec0e79c4a78d50f5c5db Mon Sep 17 00:00:00 2001 From: "mkaply%us.ibm.com" Date: Tue, 27 Jun 2000 22:31:43 +0000 Subject: [PATCH] #42637 r=pinkerton, a=brendan OS/2 bringup - Change from waterson and vidur - don't modify members in a const function --- content/base/src/nsDocument.cpp | 7 ++++--- layout/base/src/nsDocument.cpp | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/content/base/src/nsDocument.cpp b/content/base/src/nsDocument.cpp index 1d5542f03f7b..59c5f87e32d1 100644 --- a/content/base/src/nsDocument.cpp +++ b/content/base/src/nsDocument.cpp @@ -962,8 +962,9 @@ const nsString* nsDocument::GetDocumentTitle() const nsIURI* nsDocument::GetDocumentURL() const { - NS_IF_ADDREF(mDocumentURL); - return mDocumentURL; + nsIURI* url = mDocumentURL; + NS_IF_ADDREF(url); + return url; } NS_IMETHODIMP @@ -1027,7 +1028,7 @@ NS_IMETHODIMP nsDocument::GetBaseURL(nsIURI*& aURL) const { aURL = mDocumentURL; - NS_IF_ADDREF(mDocumentURL); + NS_IF_ADDREF(aURL); return NS_OK; } diff --git a/layout/base/src/nsDocument.cpp b/layout/base/src/nsDocument.cpp index 1d5542f03f7b..59c5f87e32d1 100644 --- a/layout/base/src/nsDocument.cpp +++ b/layout/base/src/nsDocument.cpp @@ -962,8 +962,9 @@ const nsString* nsDocument::GetDocumentTitle() const nsIURI* nsDocument::GetDocumentURL() const { - NS_IF_ADDREF(mDocumentURL); - return mDocumentURL; + nsIURI* url = mDocumentURL; + NS_IF_ADDREF(url); + return url; } NS_IMETHODIMP @@ -1027,7 +1028,7 @@ NS_IMETHODIMP nsDocument::GetBaseURL(nsIURI*& aURL) const { aURL = mDocumentURL; - NS_IF_ADDREF(mDocumentURL); + NS_IF_ADDREF(aURL); return NS_OK; }