diff --git a/string/obsolete/nsString2.cpp b/string/obsolete/nsString2.cpp index 7c0fabf640b3..6c493207eab0 100644 --- a/string/obsolete/nsString2.cpp +++ b/string/obsolete/nsString2.cpp @@ -682,7 +682,7 @@ char* nsString::ToNewCString() const { * http://www.cis.ohio-state.edu/htbin/rfc/rfc2279.html */ char* nsString::ToNewUTF8String() const { - nsCString temp(*this); + nsCString temp(""); temp.SetCapacity(8); //ensure that we get an allocated buffer instead of the common empty one. // Caculate how many bytes we need diff --git a/xpcom/ds/nsString2.cpp b/xpcom/ds/nsString2.cpp index 7c0fabf640b3..6c493207eab0 100644 --- a/xpcom/ds/nsString2.cpp +++ b/xpcom/ds/nsString2.cpp @@ -682,7 +682,7 @@ char* nsString::ToNewCString() const { * http://www.cis.ohio-state.edu/htbin/rfc/rfc2279.html */ char* nsString::ToNewUTF8String() const { - nsCString temp(*this); + nsCString temp(""); temp.SetCapacity(8); //ensure that we get an allocated buffer instead of the common empty one. // Caculate how many bytes we need diff --git a/xpcom/string/obsolete/nsString2.cpp b/xpcom/string/obsolete/nsString2.cpp index 7c0fabf640b3..6c493207eab0 100644 --- a/xpcom/string/obsolete/nsString2.cpp +++ b/xpcom/string/obsolete/nsString2.cpp @@ -682,7 +682,7 @@ char* nsString::ToNewCString() const { * http://www.cis.ohio-state.edu/htbin/rfc/rfc2279.html */ char* nsString::ToNewUTF8String() const { - nsCString temp(*this); + nsCString temp(""); temp.SetCapacity(8); //ensure that we get an allocated buffer instead of the common empty one. // Caculate how many bytes we need