From 3594b59c19d3e37778ffff6dcffd2193b3a4a932 Mon Sep 17 00:00:00 2001 From: "bzbarsky%mit.edu" Date: Sat, 22 May 2004 19:26:52 +0000 Subject: [PATCH] Backing out to attempt to fix Mac orange. Bug 232691 git-svn-id: svn://10.0.0.236/trunk@156776 18797224-902f-48f8-a5cc-f745e15eee43 --- .../src/html/nsHTMLFormControlAccessible.cpp | 2 +- .../src/html/nsHTMLTableAccessible.cpp | 4 ++-- .../src/xul/nsXULFormControlAccessible.cpp | 2 +- .../src/xul/nsXULMenuAccessible.cpp | 2 +- .../base/src/mozSanitizingSerializer.cpp | 2 +- mozilla/content/base/src/nsDocument.cpp | 6 ++--- .../base/src/nsHTMLContentSerializer.cpp | 8 +++---- .../base/src/nsXMLContentSerializer.cpp | 2 +- .../html/content/src/nsHTMLInputElement.cpp | 2 +- .../content/src/nsHTMLTextAreaElement.cpp | 2 +- .../html/document/src/nsHTMLDocument.cpp | 2 +- .../content/html/style/src/nsCSSScanner.cpp | 2 +- mozilla/dom/src/base/nsGlobalWindow.cpp | 4 ++-- mozilla/editor/libeditor/html/TypeInState.cpp | 10 ++++---- .../editor/libeditor/html/nsHTMLEditRules.cpp | 2 +- .../editor/libeditor/html/nsHTMLEditor.cpp | 6 ++--- .../libeditor/html/nsHTMLEditorStyle.cpp | 2 +- .../libeditor/html/nsHTMLObjectResizer.cpp | 4 ++-- .../source/CAppFileLocationProvider.cpp | 2 +- .../powerplant/source/CBrowserShell.cpp | 4 ++-- .../pref/autoconfig/src/nsLDAPSyncQuery.cpp | 4 ++-- .../spellcheck/myspell/src/myspAffixmgr.cpp | 2 +- .../source/xml/dom/standalone/Attr.cpp | 4 ++-- .../source/xml/dom/standalone/Document.cpp | 2 +- .../source/xml/dom/standalone/Element.cpp | 4 ++-- .../source/xml/dom/standalone/dom.h | 2 +- .../transformiix/source/xslt/txHTMLOutput.cpp | 2 +- .../source/xslt/txInstructions.cpp | 2 +- .../source/xslt/txMozillaTextOutput.cpp | 6 ++--- .../source/xslt/txMozillaXMLOutput.cpp | 4 ++-- .../source/xslt/txMozillaXSLTProcessor.cpp | 2 +- .../source/xslt/txUnknownHandler.cpp | 2 +- .../extensions/xmlterm/base/mozLineTerm.cpp | 2 +- .../xmlterm/base/mozXMLTerminal.cpp | 8 +++---- .../layout/forms/nsButtonFrameRenderer.cpp | 2 +- .../html/forms/src/nsButtonFrameRenderer.cpp | 2 +- mozilla/layout/style/nsCSSScanner.cpp | 2 +- .../layout/xul/base/src/nsSplitterFrame.cpp | 2 +- .../base/util/nsMsgIncomingServer.cpp | 2 +- .../mailnews/imap/src/nsImapMailFolder.cpp | 2 +- .../mailnews/local/src/nsMovemailService.cpp | 2 +- .../mailnews/local/src/nsNoIncomingServer.cpp | 2 +- mozilla/modules/libpref/src/nsPrefBranch.cpp | 2 +- mozilla/modules/oji/src/nsJVMAuthTools.cpp | 2 +- .../oji/src/nsJVMConfigManagerUnix.cpp | 4 ++-- .../netwerk/cache/src/nsDiskCacheDevice.cpp | 2 +- mozilla/profile/src/nsProfile.cpp | 2 +- mozilla/profile/src/nsProfileAccess.cpp | 4 ++-- .../webshell/tests/viewer/nsBrowserWindow.cpp | 2 +- mozilla/webshell/tests/viewer/nsViewerApp.cpp | 2 +- mozilla/xpcom/io/nsLocalFileUnix.cpp | 6 ++--- mozilla/xpcom/tests/nsIFileTest.cpp | 2 +- .../xpfe/appshell/src/nsAppShellService.cpp | 2 +- .../search/src/nsInternetSearchService.cpp | 6 ++--- mozilla/xpinstall/src/nsInstall.cpp | 24 +++++++++---------- mozilla/xpinstall/src/nsJSInstall.cpp | 2 +- 56 files changed, 97 insertions(+), 97 deletions(-) diff --git a/mozilla/accessible/src/html/nsHTMLFormControlAccessible.cpp b/mozilla/accessible/src/html/nsHTMLFormControlAccessible.cpp index 08acae95aea..3e7ed1b5abd 100644 --- a/mozilla/accessible/src/html/nsHTMLFormControlAccessible.cpp +++ b/mozilla/accessible/src/html/nsHTMLFormControlAccessible.cpp @@ -459,7 +459,7 @@ NS_IMETHODIMP nsHTMLGroupboxAccessible::GetName(nsAString& _retval) legends->Item(0, getter_AddRefs(legendNode)); nsCOMPtr legendContent(do_QueryInterface(legendNode)); if (legendContent) { - _retval.Truncate(); // Default name is blank + _retval.Assign(NS_LITERAL_STRING("")); // Default name is blank return AppendFlatStringFromSubtree(legendContent, &_retval); } } diff --git a/mozilla/accessible/src/html/nsHTMLTableAccessible.cpp b/mozilla/accessible/src/html/nsHTMLTableAccessible.cpp index 5f258b2b4b8..3ff783ea402 100644 --- a/mozilla/accessible/src/html/nsHTMLTableAccessible.cpp +++ b/mozilla/accessible/src/html/nsHTMLTableAccessible.cpp @@ -78,7 +78,7 @@ nsHTMLTableCaptionAccessible::GetState(PRUint32 *aResult) NS_IMETHODIMP nsHTMLTableCaptionAccessible::GetValue(nsAString& aResult) { - aResult.Truncate(); // Default name is blank + aResult.Assign(NS_LITERAL_STRING("")); // Default name is blank nsCOMPtr captionContent(do_QueryInterface(mDOMNode)); AppendFlatStringFromSubtree(captionContent, &aResult); @@ -109,7 +109,7 @@ NS_IMETHODIMP nsHTMLTableAccessible::GetState(PRUint32 *aResult) NS_IMETHODIMP nsHTMLTableAccessible::GetName(nsAString& aResult) { - aResult.Truncate(); // Default name is blank + aResult.Assign(NS_LITERAL_STRING("")); // Default name is blank nsCOMPtr element(do_QueryInterface(mDOMNode)); if (element) { diff --git a/mozilla/accessible/src/xul/nsXULFormControlAccessible.cpp b/mozilla/accessible/src/xul/nsXULFormControlAccessible.cpp index 7f0f710c314..1d11b602d31 100644 --- a/mozilla/accessible/src/xul/nsXULFormControlAccessible.cpp +++ b/mozilla/accessible/src/xul/nsXULFormControlAccessible.cpp @@ -404,7 +404,7 @@ NS_IMETHODIMP nsXULGroupboxAccessible::GetState(PRUint32 *_retval) NS_IMETHODIMP nsXULGroupboxAccessible::GetName(nsAString& _retval) { - _retval.Truncate(); // Default name is blank + _retval.Assign(NS_LITERAL_STRING("")); // Default name is blank nsCOMPtr element(do_QueryInterface(mDOMNode)); if (element) { diff --git a/mozilla/accessible/src/xul/nsXULMenuAccessible.cpp b/mozilla/accessible/src/xul/nsXULMenuAccessible.cpp index 5208a96b1af..4c472704c0f 100644 --- a/mozilla/accessible/src/xul/nsXULMenuAccessible.cpp +++ b/mozilla/accessible/src/xul/nsXULMenuAccessible.cpp @@ -274,7 +274,7 @@ NS_IMETHODIMP nsXULMenuSeparatorAccessible::GetState(PRUint32 *_retval) NS_IMETHODIMP nsXULMenuSeparatorAccessible::GetName(nsAString& _retval) { - _retval.Truncate(); + _retval.Assign(NS_LITERAL_STRING("")); return NS_OK; } diff --git a/mozilla/content/base/src/mozSanitizingSerializer.cpp b/mozilla/content/base/src/mozSanitizingSerializer.cpp index c31f1b5c7ec..d37f2544aba 100644 --- a/mozilla/content/base/src/mozSanitizingSerializer.cpp +++ b/mozilla/content/base/src/mozSanitizingSerializer.cpp @@ -257,7 +257,7 @@ mozSanitizingHTMLSerializer::AppendElementStart(nsIDOMElement *aElement, rv = DoOpenContainer(id); } else { - rv = DoAddLeaf(id, EmptyString()); + rv = DoAddLeaf(id, nsString()); } mContent = 0; diff --git a/mozilla/content/base/src/nsDocument.cpp b/mozilla/content/base/src/nsDocument.cpp index 2ae34d76a82..344e786a4b3 100644 --- a/mozilla/content/base/src/nsDocument.cpp +++ b/mozilla/content/base/src/nsDocument.cpp @@ -346,7 +346,7 @@ nsDOMImplementation::CreateDocumentType(const nsAString& aQualifiedName, NS_ENSURE_TRUE(name, NS_ERROR_OUT_OF_MEMORY); return NS_NewDOMDocumentType(aReturn, name, nsnull, nsnull, - aPublicId, aSystemId, EmptyString()); + aPublicId, aSystemId, nsString()); } NS_IMETHODIMP @@ -1017,7 +1017,7 @@ nsDocument::GetLineBreaker() do_GetService(NS_LWBRK_CONTRACTID, &rv); NS_ENSURE_SUCCESS(rv, nsnull); - lbf->GetBreaker(EmptyString(), getter_AddRefs(mLineBreaker)); + lbf->GetBreaker(nsString(), getter_AddRefs(mLineBreaker)); NS_ENSURE_TRUE(mLineBreaker, nsnull); } @@ -1040,7 +1040,7 @@ nsDocument::GetWordBreaker() do_GetService(NS_LWBRK_CONTRACTID, &rv); NS_ENSURE_SUCCESS(rv, nsnull); - wbf->GetBreaker(EmptyString(), getter_AddRefs(mWordBreaker)); + wbf->GetBreaker(nsString(), getter_AddRefs(mWordBreaker)); NS_ENSURE_TRUE(wbf, nsnull); } diff --git a/mozilla/content/base/src/nsHTMLContentSerializer.cpp b/mozilla/content/base/src/nsHTMLContentSerializer.cpp index 030e9c7e73a..fd7787276ae 100644 --- a/mozilla/content/base/src/nsHTMLContentSerializer.cpp +++ b/mozilla/content/base/src/nsHTMLContentSerializer.cpp @@ -170,7 +170,7 @@ nsHTMLContentSerializer::AppendText(nsIDOMText* aText, nsresult rv; nsCOMPtr lf(do_GetService(kLWBrkCID, &rv)); if (NS_SUCCEEDED(rv)) { - rv = lf->GetBreaker(EmptyString(), getter_AddRefs(mLineBreaker)); + rv = lf->GetBreaker(nsString(), getter_AddRefs(mLineBreaker)); // Ignore result value. // If we are unable to obtain a line breaker, // we will use our simple fallback logic. @@ -655,7 +655,7 @@ nsHTMLContentSerializer::SerializeAttributes(nsIContent* aContent, if (IsShorthandAttr(attrName, aTagName) && valueStr.IsEmpty()) { valueStr = nameStr; } - SerializeAttr(EmptyString(), nameStr, valueStr, aStr, !isJS); + SerializeAttr(nsAutoString(), nameStr, valueStr, aStr, !isJS); } } @@ -1321,7 +1321,7 @@ nsHTMLContentSerializer::SerializeLIValueAttribute(nsIDOMElement* aElement, if (offset == 0 && found) { // offset = 0 => LI itself has the value attribute and we did not need to traverse back. // Just serialize value attribute like other tags. - SerializeAttr(EmptyString(), NS_LITERAL_STRING("value"), valueStr, aStr, PR_FALSE); + SerializeAttr(nsAutoString(), NS_LITERAL_STRING("value"), valueStr, aStr, PR_FALSE); } else if (offset == 1 && !found) { /*(offset = 1 && !found) means either LI is the first child node of OL @@ -1336,7 +1336,7 @@ nsHTMLContentSerializer::SerializeLIValueAttribute(nsIDOMElement* aElement, //As serializer needs to use this valueAttr we are creating here, valueStr.AppendInt(startVal + offset); - SerializeAttr(EmptyString(), NS_LITERAL_STRING("value"), valueStr, aStr, PR_FALSE); + SerializeAttr(nsAutoString(), NS_LITERAL_STRING("value"), valueStr, aStr, PR_FALSE); } } diff --git a/mozilla/content/base/src/nsXMLContentSerializer.cpp b/mozilla/content/base/src/nsXMLContentSerializer.cpp index 7d3c5491c1a..9ecb6253892 100644 --- a/mozilla/content/base/src/nsXMLContentSerializer.cpp +++ b/mozilla/content/base/src/nsXMLContentSerializer.cpp @@ -510,7 +510,7 @@ nsXMLContentSerializer::AppendElementStart(nsIDOMElement *aElement, if (!attrPrefix) { // Default NS attribute does not have prefix (and the name is "xmlns") - PushNameSpaceDecl(EmptyString(), uriStr, aElement); + PushNameSpaceDecl(nsString(), uriStr, aElement); } else { attrName->ToString(nameStr); PushNameSpaceDecl(nameStr, uriStr, aElement); diff --git a/mozilla/content/html/content/src/nsHTMLInputElement.cpp b/mozilla/content/html/content/src/nsHTMLInputElement.cpp index 678726e8e66..6a20cdbb560 100644 --- a/mozilla/content/html/content/src/nsHTMLInputElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLInputElement.cpp @@ -1201,7 +1201,7 @@ nsHTMLInputElement::SelectAll(nsIPresContext* aPresContext) if (formControlFrame) { formControlFrame->SetProperty(aPresContext, nsHTMLAtoms::select, - EmptyString()); + nsAutoString()); } } diff --git a/mozilla/content/html/content/src/nsHTMLTextAreaElement.cpp b/mozilla/content/html/content/src/nsHTMLTextAreaElement.cpp index fdd548d81cb..59ad392259b 100644 --- a/mozilla/content/html/content/src/nsHTMLTextAreaElement.cpp +++ b/mozilla/content/html/content/src/nsHTMLTextAreaElement.cpp @@ -329,7 +329,7 @@ nsHTMLTextAreaElement::SelectAll(nsIPresContext* aPresContext) if (formControlFrame) { formControlFrame->SetProperty(aPresContext, nsHTMLAtoms::select, - EmptyString()); + nsString()); } return NS_OK; diff --git a/mozilla/content/html/document/src/nsHTMLDocument.cpp b/mozilla/content/html/document/src/nsHTMLDocument.cpp index b1c43701b92..b358ffd2440 100644 --- a/mozilla/content/html/document/src/nsHTMLDocument.cpp +++ b/mozilla/content/html/document/src/nsHTMLDocument.cpp @@ -2380,7 +2380,7 @@ nsHTMLDocument::ScriptWriteCommon(PRBool aNewlineTerminate) } // No arguments... - return WriteCommon(EmptyString(), aNewlineTerminate); + return WriteCommon(nsString(), aNewlineTerminate); } NS_IMETHODIMP diff --git a/mozilla/content/html/style/src/nsCSSScanner.cpp b/mozilla/content/html/style/src/nsCSSScanner.cpp index 7ffbd315887..5bf607198b3 100644 --- a/mozilla/content/html/style/src/nsCSSScanner.cpp +++ b/mozilla/content/html/style/src/nsCSSScanner.cpp @@ -260,7 +260,7 @@ void nsCSSScanner::OutputError() PRUnichar *error = ToNewUnicode(mError); rv = errorObject->Init(error, NS_ConvertASCIItoUCS2(mFileName.get()).get(), - EmptyString().get(), + NS_LITERAL_STRING("").get(), mErrorLineNumber, mErrorColNumber, 0, diff --git a/mozilla/dom/src/base/nsGlobalWindow.cpp b/mozilla/dom/src/base/nsGlobalWindow.cpp index ebda7a1bc0c..cdbf883118f 100644 --- a/mozilla/dom/src/base/nsGlobalWindow.cpp +++ b/mozilla/dom/src/base/nsGlobalWindow.cpp @@ -526,8 +526,8 @@ GlobalWindowImpl::SetNewDocument(nsIDOMDocument* aDocument, than going away. See bug 61840. */ if (mDocShell && aDocument) { - SetStatus(EmptyString()); - SetDefaultStatus(EmptyString()); + SetStatus(nsString()); + SetDefaultStatus(nsString()); } if (mDocument) { diff --git a/mozilla/editor/libeditor/html/TypeInState.cpp b/mozilla/editor/libeditor/html/TypeInState.cpp index cd8c339bb3e..3f8d3be9fa2 100644 --- a/mozilla/editor/libeditor/html/TypeInState.cpp +++ b/mozilla/editor/libeditor/html/TypeInState.cpp @@ -158,12 +158,12 @@ void TypeInState::Reset() nsresult TypeInState::SetProp(nsIAtom *aProp) { - return SetProp(aProp,EmptyString(),EmptyString()); + return SetProp(aProp,nsAutoString(),nsAutoString()); } nsresult TypeInState::SetProp(nsIAtom *aProp, const nsString &aAttr) { - return SetProp(aProp,aAttr,EmptyString()); + return SetProp(aProp,aAttr,nsAutoString()); } nsresult TypeInState::SetProp(nsIAtom *aProp, const nsString &aAttr, const nsString &aValue) @@ -209,12 +209,12 @@ nsresult TypeInState::SetProp(nsIAtom *aProp, const nsString &aAttr, const nsStr nsresult TypeInState::ClearAllProps() { // null prop means "all" props - return ClearProp(nsnull,EmptyString()); + return ClearProp(nsnull,nsAutoString()); } nsresult TypeInState::ClearProp(nsIAtom *aProp) { - return ClearProp(aProp,EmptyString()); + return ClearProp(aProp,nsAutoString()); } nsresult TypeInState::ClearProp(nsIAtom *aProp, const nsString &aAttr) @@ -285,7 +285,7 @@ nsresult TypeInState::TakeRelativeFontSize(PRInt32 *outRelSize) nsresult TypeInState::GetTypingState(PRBool &isSet, PRBool &theSetting, nsIAtom *aProp) { - return GetTypingState(isSet, theSetting, aProp, EmptyString(), nsnull); + return GetTypingState(isSet, theSetting, aProp, nsAutoString(), nsnull); } nsresult TypeInState::GetTypingState(PRBool &isSet, diff --git a/mozilla/editor/libeditor/html/nsHTMLEditRules.cpp b/mozilla/editor/libeditor/html/nsHTMLEditRules.cpp index d596e4bec1f..729f5677dcc 100644 --- a/mozilla/editor/libeditor/html/nsHTMLEditRules.cpp +++ b/mozilla/editor/libeditor/html/nsHTMLEditRules.cpp @@ -4303,7 +4303,7 @@ nsHTMLEditRules::CreateStyleForInsertText(nsISelection *aSelection, nsIDOMDocume } nsCOMPtr newNode; nsCOMPtr nodeAsText; - res = aDoc->CreateTextNode(EmptyString(), getter_AddRefs(nodeAsText)); + res = aDoc->CreateTextNode(nsAutoString(), getter_AddRefs(nodeAsText)); if (NS_FAILED(res)) return res; if (!nodeAsText) return NS_ERROR_NULL_POINTER; newNode = do_QueryInterface(nodeAsText); diff --git a/mozilla/editor/libeditor/html/nsHTMLEditor.cpp b/mozilla/editor/libeditor/html/nsHTMLEditor.cpp index 6b6a52721b7..65f3c25535e 100644 --- a/mozilla/editor/libeditor/html/nsHTMLEditor.cpp +++ b/mozilla/editor/libeditor/html/nsHTMLEditor.cpp @@ -2510,7 +2510,7 @@ nsHTMLEditor::GetHTMLBackgroundColorState(PRBool *aMixed, nsAString &aOutColor) //TODO: We don't handle "mixed" correctly! if (!aMixed) return NS_ERROR_NULL_POINTER; *aMixed = PR_FALSE; - aOutColor.Truncate(); + aOutColor.Assign(NS_LITERAL_STRING("")); nsCOMPtr element; PRInt32 selectedCount; @@ -3312,7 +3312,7 @@ nsHTMLEditor::CreateElementWithDefaults(const nsAString& aTagName, nsIDOMElement return NS_ERROR_FAILURE; // Mark the new element dirty, so it will be formatted - newElement->SetAttribute(NS_LITERAL_STRING("_moz_dirty"), EmptyString()); + newElement->SetAttribute(NS_LITERAL_STRING("_moz_dirty"), nsAutoString()); // Set default values for new elements if (TagName.Equals(NS_LITERAL_STRING("hr"))) @@ -6030,7 +6030,7 @@ nsHTMLEditor::GetSelectionContainer(nsIDOMElement ** aReturn) nsCOMPtr focusElement; if (startContainer == endContainer && startOffset + 1 == endOffset) { - res = GetSelectedElement(EmptyString(), getter_AddRefs(focusElement)); + res = GetSelectedElement(NS_LITERAL_STRING(""), getter_AddRefs(focusElement)); if (NS_FAILED(res)) return res; if (focusElement) focusNode = do_QueryInterface(focusElement); diff --git a/mozilla/editor/libeditor/html/nsHTMLEditorStyle.cpp b/mozilla/editor/libeditor/html/nsHTMLEditorStyle.cpp index 4511cb0670e..fab826c329a 100644 --- a/mozilla/editor/libeditor/html/nsHTMLEditorStyle.cpp +++ b/mozilla/editor/libeditor/html/nsHTMLEditorStyle.cpp @@ -1501,7 +1501,7 @@ nsHTMLEditor::RelativeFontChange( PRInt32 aSizeChange) if (!CanContainTag(selectedNode, tag)) return NS_OK; // manipulating text attributes on a collapsed selection only sets state for the next text insertion - return mTypeInState->SetProp(atom, EmptyString(), EmptyString()); + return mTypeInState->SetProp(atom, nsAutoString(), nsAutoString()); } // wrap with txn batching, rules sniffing, and selection preservation code diff --git a/mozilla/editor/libeditor/html/nsHTMLObjectResizer.cpp b/mozilla/editor/libeditor/html/nsHTMLObjectResizer.cpp index 894bc5e6d9b..04a0733b6f0 100644 --- a/mozilla/editor/libeditor/html/nsHTMLObjectResizer.cpp +++ b/mozilla/editor/libeditor/html/nsHTMLObjectResizer.cpp @@ -1044,12 +1044,12 @@ nsHTMLEditor::SetFinalSize(PRInt32 aX, PRInt32 aY) if (setWidth) mHTMLCSSUtils->RemoveCSSProperty(mResizedObject, nsEditProperty::cssWidth, - EmptyString(), + NS_LITERAL_STRING(""), PR_FALSE); if (setHeight) mHTMLCSSUtils->RemoveCSSProperty(mResizedObject, nsEditProperty::cssHeight, - EmptyString(), + NS_LITERAL_STRING(""), PR_FALSE); } // finally notify the listeners if any diff --git a/mozilla/embedding/browser/powerplant/source/CAppFileLocationProvider.cpp b/mozilla/embedding/browser/powerplant/source/CAppFileLocationProvider.cpp index fc61f8ee0bc..2b9ebeb1b4b 100755 --- a/mozilla/embedding/browser/powerplant/source/CAppFileLocationProvider.cpp +++ b/mozilla/embedding/browser/powerplant/source/CAppFileLocationProvider.cpp @@ -141,7 +141,7 @@ NS_METHOD CAppFileLocationProvider::GetAppDataDirectory(nsILocalFile **aLocalFil FSRef fsRef; err = ::FSFindFolder(kUserDomain, kApplicationSupportFolderType, kCreateFolder, &fsRef); if (err) return NS_ERROR_FAILURE; - NS_NewLocalFile(EmptyString(), PR_TRUE, getter_AddRefs(localDir)); + NS_NewLocalFile(nsString(), PR_TRUE, getter_AddRefs(localDir)); if (!localDir) return NS_ERROR_FAILURE; nsCOMPtr localDirMac(do_QueryInterface(localDir)); rv = localDirMac->InitWithFSRef(&fsRef); diff --git a/mozilla/embedding/browser/powerplant/source/CBrowserShell.cpp b/mozilla/embedding/browser/powerplant/source/CBrowserShell.cpp index 2dcc53d5f1d..31cbfa3de14 100644 --- a/mozilla/embedding/browser/powerplant/source/CBrowserShell.cpp +++ b/mozilla/embedding/browser/powerplant/source/CBrowserShell.cpp @@ -1105,13 +1105,13 @@ NS_METHOD CBrowserShell::SaveDocument(ESaveFormat inSaveFormat) if (NS_FAILED(rv)) return rv; - return SaveInternal(documentURI, domDocument, EmptyString(), false, inSaveFormat); // don't bypass cache + return SaveInternal(documentURI, domDocument, nsString(), false, inSaveFormat); // don't bypass cache } // Save link target NS_METHOD CBrowserShell::SaveLink(nsIURI* inURI) { - return SaveInternal(inURI, nsnull, EmptyString(), true, eSaveFormatHTML); // bypass cache + return SaveInternal(inURI, nsnull, nsString(), true, eSaveFormatHTML); // bypass cache } const char* const kPersistContractID = "@mozilla.org/embedding/browser/nsWebBrowserPersist;1"; diff --git a/mozilla/extensions/pref/autoconfig/src/nsLDAPSyncQuery.cpp b/mozilla/extensions/pref/autoconfig/src/nsLDAPSyncQuery.cpp index 6f6966bf94c..7eb3706def6 100644 --- a/mozilla/extensions/pref/autoconfig/src/nsLDAPSyncQuery.cpp +++ b/mozilla/extensions/pref/autoconfig/src/nsLDAPSyncQuery.cpp @@ -164,7 +164,7 @@ nsLDAPSyncQuery::OnLDAPInit(nsILDAPConnection *aConn, nsresult aStatus) // kick off a bind operation // - rv = mOperation->SimpleBind(EmptyCString()); + rv = mOperation->SimpleBind(nsCString()); if (NS_FAILED(rv)) { FinishLDAPQuery(); return NS_ERROR_FAILURE; @@ -423,7 +423,7 @@ nsresult nsLDAPSyncQuery::InitConnection() rv = mConnection->Init(host.get(), port, (options & nsILDAPURL::OPT_SECURE) - ? PR_TRUE : PR_FALSE, EmptyCString(), selfProxy, + ? PR_TRUE : PR_FALSE, nsCString(), selfProxy, nsnull, mProtocolVersion); if (NS_FAILED(rv)) { FinishLDAPQuery(); diff --git a/mozilla/extensions/spellcheck/myspell/src/myspAffixmgr.cpp b/mozilla/extensions/spellcheck/myspell/src/myspAffixmgr.cpp index d398c379a30..14c0ff5ab3e 100644 --- a/mozilla/extensions/spellcheck/myspell/src/myspAffixmgr.cpp +++ b/mozilla/extensions/spellcheck/myspell/src/myspAffixmgr.cpp @@ -520,7 +520,7 @@ nsresult myspAffixMgr::DecodeString(const nsAFlatCString &aSource, nsAString &aDest) { if (!mDecoder) { - aDest.Truncate(); + aDest.Assign(NS_LITERAL_STRING("")); return NS_OK; } PRInt32 inLength = aSource.Length(); diff --git a/mozilla/extensions/transformiix/source/xml/dom/standalone/Attr.cpp b/mozilla/extensions/transformiix/source/xml/dom/standalone/Attr.cpp index 1efe0683c62..1f1c818c508 100644 --- a/mozilla/extensions/transformiix/source/xml/dom/standalone/Attr.cpp +++ b/mozilla/extensions/transformiix/source/xml/dom/standalone/Attr.cpp @@ -49,7 +49,7 @@ //Construct an Attribute object using the specified name and document owner // Attr::Attr(const nsAString& name, Document* owner): - NodeDefinition(Node::ATTRIBUTE_NODE, name, EmptyString(), owner) + NodeDefinition(Node::ATTRIBUTE_NODE, name, nsString(), owner) { int idx = nodeName.FindChar(':'); if (idx == kNotFound) { @@ -78,7 +78,7 @@ Attr::Attr(const nsAString& name, Document* owner): Attr::Attr(const nsAString& aNamespaceURI, const nsAString& aName, Document* aOwner) : - NodeDefinition(Node::ATTRIBUTE_NODE, aName, EmptyString(), aOwner) + NodeDefinition(Node::ATTRIBUTE_NODE, aName, nsString(), aOwner) { if (aNamespaceURI.IsEmpty()) mNamespaceID = kNameSpaceID_None; diff --git a/mozilla/extensions/transformiix/source/xml/dom/standalone/Document.cpp b/mozilla/extensions/transformiix/source/xml/dom/standalone/Document.cpp index 8d981e5ebaa..e75f8302853 100644 --- a/mozilla/extensions/transformiix/source/xml/dom/standalone/Document.cpp +++ b/mozilla/extensions/transformiix/source/xml/dom/standalone/Document.cpp @@ -54,7 +54,7 @@ //Construct a Document. Currently no parameters are required, but the the //node constructor is called to identify the node type. // -Document::Document() : NodeDefinition(Node::DOCUMENT_NODE, EmptyString(), NULL) +Document::Document() : NodeDefinition(Node::DOCUMENT_NODE, nsString(), NULL) { mIDMap.Init(0); documentElement = nsnull; diff --git a/mozilla/extensions/transformiix/source/xml/dom/standalone/Element.cpp b/mozilla/extensions/transformiix/source/xml/dom/standalone/Element.cpp index a9e64c723c7..e80a43f7725 100644 --- a/mozilla/extensions/transformiix/source/xml/dom/standalone/Element.cpp +++ b/mozilla/extensions/transformiix/source/xml/dom/standalone/Element.cpp @@ -51,7 +51,7 @@ //type. // Element::Element(const nsAString& tagName, Document* owner) : - NodeDefinition(Node::ELEMENT_NODE, tagName, EmptyString(), owner) + NodeDefinition(Node::ELEMENT_NODE, tagName, nsString(), owner) { mAttributes.ownerElement = this; mNamespaceID = kNameSpaceID_Unknown; @@ -69,7 +69,7 @@ Element::Element(const nsAString& tagName, Document* owner) : Element::Element(const nsAString& aNamespaceURI, const nsAString& aTagName, Document* aOwner) : - NodeDefinition(Node::ELEMENT_NODE, aTagName, EmptyString(), aOwner) + NodeDefinition(Node::ELEMENT_NODE, aTagName, nsString(), aOwner) { Element(aTagName, aOwner); if (aNamespaceURI.IsEmpty()) diff --git a/mozilla/extensions/transformiix/source/xml/dom/standalone/dom.h b/mozilla/extensions/transformiix/source/xml/dom/standalone/dom.h index 8aaa52129c5..5702c0bb287 100644 --- a/mozilla/extensions/transformiix/source/xml/dom/standalone/dom.h +++ b/mozilla/extensions/transformiix/source/xml/dom/standalone/dom.h @@ -372,7 +372,7 @@ class DocumentFragment : public NodeDefinition private: friend class Document; DocumentFragment(Document* aOwner) : - NodeDefinition(Node::DOCUMENT_FRAGMENT_NODE, EmptyString(), aOwner) + NodeDefinition(Node::DOCUMENT_FRAGMENT_NODE, nsString(), aOwner) { }; }; diff --git a/mozilla/extensions/transformiix/source/xslt/txHTMLOutput.cpp b/mozilla/extensions/transformiix/source/xslt/txHTMLOutput.cpp index f2396256bf2..5c3d4adecd4 100644 --- a/mozilla/extensions/transformiix/source/xslt/txHTMLOutput.cpp +++ b/mozilla/extensions/transformiix/source/xslt/txHTMLOutput.cpp @@ -225,7 +225,7 @@ void txHTMLOutput::attribute(const nsAString& aName, } } if (!setAtt) { - setAtt = new txOutAttr(aNsID, localName, EmptyString()); + setAtt = new txOutAttr(aNsID, localName, nsString()); setAtt->mShorthand = MB_TRUE; mAttributes.add(setAtt); } diff --git a/mozilla/extensions/transformiix/source/xslt/txInstructions.cpp b/mozilla/extensions/transformiix/source/xslt/txInstructions.cpp index 1306c829730..649ad92f578 100644 --- a/mozilla/extensions/transformiix/source/xslt/txInstructions.cpp +++ b/mozilla/extensions/transformiix/source/xslt/txInstructions.cpp @@ -958,7 +958,7 @@ txStartElement::execute(txExecutionState& aEs) else { // we call characters with an empty string to "close" any element to // make sure that no attributes are added - aEs.mResultHandler->characters(EmptyString(), PR_FALSE); + aEs.mResultHandler->characters(nsString(), PR_FALSE); } rv = aEs.pushString(name); diff --git a/mozilla/extensions/transformiix/source/xslt/txMozillaTextOutput.cpp b/mozilla/extensions/transformiix/source/xslt/txMozillaTextOutput.cpp index 9a440f6ff4f..c3cf0b80c03 100644 --- a/mozilla/extensions/transformiix/source/xslt/txMozillaTextOutput.cpp +++ b/mozilla/extensions/transformiix/source/xslt/txMozillaTextOutput.cpp @@ -66,7 +66,7 @@ txMozillaTextOutput::txMozillaTextOutput(nsIDOMDocumentFragment* aDest) aDest->GetOwnerDocument(getter_AddRefs(doc)); NS_ASSERTION(doc, "unable to get ownerdocument"); nsCOMPtr textNode; - nsresult rv = doc->CreateTextNode(EmptyString(), + nsresult rv = doc->CreateTextNode(nsString(), getter_AddRefs(textNode)); if (NS_FAILED(rv)) { return; @@ -165,7 +165,7 @@ void txMozillaTextOutput::createResultDocument(nsIDOMDocument* aSourceDocument, nsCOMPtr nsDoc = do_QueryInterface(mDocument); if (nsDoc) { - nsDoc->SetTitle(EmptyString()); + nsDoc->SetTitle(nsString()); } // Reset and set up document @@ -293,7 +293,7 @@ void txMozillaTextOutput::createResultDocument(nsIDOMDocument* aSourceDocument, } nsCOMPtr textNode; - mDocument->CreateTextNode(EmptyString(), + mDocument->CreateTextNode(nsString(), getter_AddRefs(textNode)); NS_ASSERTION(textNode, "Failed to create the text node"); if (!textNode) { diff --git a/mozilla/extensions/transformiix/source/xslt/txMozillaXMLOutput.cpp b/mozilla/extensions/transformiix/source/xslt/txMozillaXMLOutput.cpp index bf6e2a39b39..0b6b3434a24 100644 --- a/mozilla/extensions/transformiix/source/xslt/txMozillaXMLOutput.cpp +++ b/mozilla/extensions/transformiix/source/xslt/txMozillaXMLOutput.cpp @@ -155,7 +155,7 @@ void txMozillaXMLOutput::attribute(const nsAString& aName, // Outputting HTML as XHTML, lowercase attribute names nsAutoString lowerName; TX_ToLowerCase(aName, lowerName); - element->SetAttributeNS(EmptyString(), lowerName, + element->SetAttributeNS(nsString(), lowerName, aValue); } else { @@ -202,7 +202,7 @@ void txMozillaXMLOutput::endDocument() if (mCreatingNewDocument && !mHaveTitleElement) { nsCOMPtr domDoc = do_QueryInterface(mDocument); if (domDoc) { - domDoc->SetTitle(EmptyString()); + domDoc->SetTitle(nsString()); } } diff --git a/mozilla/extensions/transformiix/source/xslt/txMozillaXSLTProcessor.cpp b/mozilla/extensions/transformiix/source/xslt/txMozillaXSLTProcessor.cpp index 3cdbec2bca5..92afc19a3cd 100644 --- a/mozilla/extensions/transformiix/source/xslt/txMozillaXSLTProcessor.cpp +++ b/mozilla/extensions/transformiix/source/xslt/txMozillaXSLTProcessor.cpp @@ -688,7 +688,7 @@ txMozillaXSLTProcessor::reportError(nsresult aResult, do_GetService(NS_STRINGBUNDLE_CONTRACTID); if (sbs) { nsXPIDLString errorText; - sbs->FormatStatusMessage(aResult, EmptyString().get(), + sbs->FormatStatusMessage(aResult, nsString().get(), getter_Copies(errorText)); nsXPIDLString errorMessage; diff --git a/mozilla/extensions/transformiix/source/xslt/txUnknownHandler.cpp b/mozilla/extensions/transformiix/source/xslt/txUnknownHandler.cpp index cf52ee6d19d..4e3baa65d03 100644 --- a/mozilla/extensions/transformiix/source/xslt/txUnknownHandler.cpp +++ b/mozilla/extensions/transformiix/source/xslt/txUnknownHandler.cpp @@ -65,7 +65,7 @@ void txUnknownHandler::endDocument() // didn't create a document element. Switching to XML output mode // anyway. - nsresult rv = createHandlerAndFlush(eXMLOutput, EmptyString(), + nsresult rv = createHandlerAndFlush(eXMLOutput, nsString(), kNameSpaceID_None); if (NS_FAILED(rv)) return; diff --git a/mozilla/extensions/xmlterm/base/mozLineTerm.cpp b/mozilla/extensions/xmlterm/base/mozLineTerm.cpp index d61d4aee877..526860fe1cb 100644 --- a/mozilla/extensions/xmlterm/base/mozLineTerm.cpp +++ b/mozilla/extensions/xmlterm/base/mozLineTerm.cpp @@ -121,7 +121,7 @@ mozLineTerm::mozLineTerm() : mSuspended(PR_FALSE), mEchoFlag(PR_TRUE), mObserver(nsnull), - mCookie(EmptyString()), + mCookie(nsAutoString()), mLastTime(LL_ZERO) { mLTerm = lterm_new(); diff --git a/mozilla/extensions/xmlterm/base/mozXMLTerminal.cpp b/mozilla/extensions/xmlterm/base/mozXMLTerminal.cpp index b0608dc1cb1..eaebe5ad746 100644 --- a/mozilla/extensions/xmlterm/base/mozXMLTerminal.cpp +++ b/mozilla/extensions/xmlterm/base/mozXMLTerminal.cpp @@ -102,12 +102,12 @@ NS_IMPL_THREADSAFE_ISUPPORTS4(mozXMLTerminal, mozXMLTerminal::mozXMLTerminal() : mInitialized(PR_FALSE), - mCookie(EmptyString()), + mCookie(nsAutoString()), - mCommand(EmptyString()), - mPromptExpr(EmptyString()), + mCommand(nsAutoString()), + mPromptExpr(nsAutoString()), - mInitInput(EmptyString()), + mInitInput(nsAutoString()), mXMLTermShell(nsnull), mDocShell(nsnull), diff --git a/mozilla/layout/forms/nsButtonFrameRenderer.cpp b/mozilla/layout/forms/nsButtonFrameRenderer.cpp index ef3cf812014..e992d453412 100644 --- a/mozilla/layout/forms/nsButtonFrameRenderer.cpp +++ b/mozilla/layout/forms/nsButtonFrameRenderer.cpp @@ -78,7 +78,7 @@ void nsButtonFrameRenderer::SetDisabled(PRBool aDisabled, PRBool notify) { if (aDisabled) - mFrame->GetContent()->SetAttr(kNameSpaceID_None, nsHTMLAtoms::disabled, EmptyString(), + mFrame->GetContent()->SetAttr(kNameSpaceID_None, nsHTMLAtoms::disabled, nsString(), notify); else mFrame->GetContent()->UnsetAttr(kNameSpaceID_None, nsHTMLAtoms::disabled, notify); diff --git a/mozilla/layout/html/forms/src/nsButtonFrameRenderer.cpp b/mozilla/layout/html/forms/src/nsButtonFrameRenderer.cpp index ef3cf812014..e992d453412 100644 --- a/mozilla/layout/html/forms/src/nsButtonFrameRenderer.cpp +++ b/mozilla/layout/html/forms/src/nsButtonFrameRenderer.cpp @@ -78,7 +78,7 @@ void nsButtonFrameRenderer::SetDisabled(PRBool aDisabled, PRBool notify) { if (aDisabled) - mFrame->GetContent()->SetAttr(kNameSpaceID_None, nsHTMLAtoms::disabled, EmptyString(), + mFrame->GetContent()->SetAttr(kNameSpaceID_None, nsHTMLAtoms::disabled, nsString(), notify); else mFrame->GetContent()->UnsetAttr(kNameSpaceID_None, nsHTMLAtoms::disabled, notify); diff --git a/mozilla/layout/style/nsCSSScanner.cpp b/mozilla/layout/style/nsCSSScanner.cpp index 7ffbd315887..5bf607198b3 100644 --- a/mozilla/layout/style/nsCSSScanner.cpp +++ b/mozilla/layout/style/nsCSSScanner.cpp @@ -260,7 +260,7 @@ void nsCSSScanner::OutputError() PRUnichar *error = ToNewUnicode(mError); rv = errorObject->Init(error, NS_ConvertASCIItoUCS2(mFileName.get()).get(), - EmptyString().get(), + NS_LITERAL_STRING("").get(), mErrorLineNumber, mErrorColNumber, 0, diff --git a/mozilla/layout/xul/base/src/nsSplitterFrame.cpp b/mozilla/layout/xul/base/src/nsSplitterFrame.cpp index 49735c6a3e3..a309f5de881 100644 --- a/mozilla/layout/xul/base/src/nsSplitterFrame.cpp +++ b/mozilla/layout/xul/base/src/nsSplitterFrame.cpp @@ -503,7 +503,7 @@ nsSplitterFrameInner::MouseUp(nsIPresContext* aPresContext, nsGUIEvent* aEvent) State newState = GetState(); // if the state is dragging then make it Open. if (newState == Dragging) - mOuter->mContent->SetAttr(kNameSpaceID_None, nsXULAtoms::state, EmptyString(), PR_TRUE); + mOuter->mContent->SetAttr(kNameSpaceID_None, nsXULAtoms::state, nsAutoString(), PR_TRUE); mPressed = PR_FALSE; diff --git a/mozilla/mailnews/base/util/nsMsgIncomingServer.cpp b/mozilla/mailnews/base/util/nsMsgIncomingServer.cpp index f5994689cc5..32b2cd334a5 100644 --- a/mozilla/mailnews/base/util/nsMsgIncomingServer.cpp +++ b/mozilla/mailnews/base/util/nsMsgIncomingServer.cpp @@ -1810,7 +1810,7 @@ nsMsgIncomingServer::GetPasswordPromptRequired(PRBool *aPasswordIsRequired) nsAutoString passwordFound; // Get password entry corresponding to the host URI we are passing in. - rv = passwordMgrInt->FindPasswordEntry(currServerUri, EmptyString(), EmptyString(), + rv = passwordMgrInt->FindPasswordEntry(currServerUri, nsString(), nsString(), hostFound, userNameFound, passwordFound); if (NS_FAILED(rv)) { diff --git a/mozilla/mailnews/imap/src/nsImapMailFolder.cpp b/mozilla/mailnews/imap/src/nsImapMailFolder.cpp index 97f456d8e17..94cf92f6f89 100644 --- a/mozilla/mailnews/imap/src/nsImapMailFolder.cpp +++ b/mozilla/mailnews/imap/src/nsImapMailFolder.cpp @@ -178,7 +178,7 @@ nsresult RecursiveCopy(nsIFile* srcDir, nsIFile* destDir) } } else - rv = dirEntry->CopyTo(destDir, EmptyString()); + rv = dirEntry->CopyTo(destDir, nsString()); } } diff --git a/mozilla/mailnews/local/src/nsMovemailService.cpp b/mozilla/mailnews/local/src/nsMovemailService.cpp index 4f0f28c7438..2e66eed8089 100644 --- a/mozilla/mailnews/local/src/nsMovemailService.cpp +++ b/mozilla/mailnews/local/src/nsMovemailService.cpp @@ -278,7 +278,7 @@ LocateSpoolFile(nsACString & spoolPath) nsresult rv; nsCOMPtr spoolFile; - rv = NS_NewNativeLocalFile(EmptyCString(), PR_TRUE, getter_AddRefs(spoolFile)); + rv = NS_NewNativeLocalFile(nsCString(), PR_TRUE, getter_AddRefs(spoolFile)); NS_ENSURE_SUCCESS(rv, rv); char * mailEnv = PR_GetEnv("MAIL"); diff --git a/mozilla/mailnews/local/src/nsNoIncomingServer.cpp b/mozilla/mailnews/local/src/nsNoIncomingServer.cpp index c0c469f255f..7e2095d17be 100644 --- a/mozilla/mailnews/local/src/nsNoIncomingServer.cpp +++ b/mozilla/mailnews/local/src/nsNoIncomingServer.cpp @@ -158,7 +158,7 @@ NS_IMETHODIMP nsNoIncomingServer::CopyDefaultMessages(const char *folderNameOnDi #ifdef DEBUG_sspitzer printf("copy default %s\n",folderNameOnDisk); #endif - rv = defaultMessagesFile->CopyTo(localParentDir, EmptyString()); + rv = defaultMessagesFile->CopyTo(localParentDir, nsString()); if (NS_FAILED(rv)) return rv; } return NS_OK; diff --git a/mozilla/modules/libpref/src/nsPrefBranch.cpp b/mozilla/modules/libpref/src/nsPrefBranch.cpp index 67f14066d3c..fb11ad3f7d0 100644 --- a/mozilla/modules/libpref/src/nsPrefBranch.cpp +++ b/mozilla/modules/libpref/src/nsPrefBranch.cpp @@ -313,7 +313,7 @@ NS_IMETHODIMP nsPrefBranch::GetComplexValue(const char *aPrefName, const nsIID & return rv; nsCOMPtr theFile; - rv = NS_NewNativeLocalFile(EmptyCString(), PR_TRUE, getter_AddRefs(theFile)); + rv = NS_NewNativeLocalFile(nsCString(), PR_TRUE, getter_AddRefs(theFile)); if (NS_FAILED(rv)) return rv; rv = theFile->SetRelativeDescriptor(fromFile, Substring(++keyEnd, strEnd)); diff --git a/mozilla/modules/oji/src/nsJVMAuthTools.cpp b/mozilla/modules/oji/src/nsJVMAuthTools.cpp index 8e93c51d551..196c9d3ca78 100644 --- a/mozilla/modules/oji/src/nsJVMAuthTools.cpp +++ b/mozilla/modules/oji/src/nsJVMAuthTools.cpp @@ -211,7 +211,7 @@ nsJVMAuthTools::SetAuthenticationInfo(const char* protocol, schemeString, realmString, EmptyCString(), - EmptyString(), + nsString(), NS_ConvertUTF8toUCS2(username), NS_ConvertUTF8toUCS2(password)); return rv; diff --git a/mozilla/modules/oji/src/nsJVMConfigManagerUnix.cpp b/mozilla/modules/oji/src/nsJVMConfigManagerUnix.cpp index e9567fe2150..042fc519bdc 100644 --- a/mozilla/modules/oji/src/nsJVMConfigManagerUnix.cpp +++ b/mozilla/modules/oji/src/nsJVMConfigManagerUnix.cpp @@ -615,8 +615,8 @@ nsJVMConfigManagerUnix::AddDirectory(nsAString& aHomeDirName) nsJVMConfig* config = NS_STATIC_CAST(nsJVMConfig *, mJVMConfigList.Get(&key)); if (!config) { - config = new nsJVMConfig(version, type, EmptyString(), arch, path, - mozPluginPath, EmptyString()); + config = new nsJVMConfig(version, type, nsString(), arch, path, + mozPluginPath, nsString()); NS_ENSURE_TRUE(config, NS_ERROR_OUT_OF_MEMORY); mJVMConfigList.Put(&key, NS_STATIC_CAST(void *, config)); NS_ADDREF(config); diff --git a/mozilla/netwerk/cache/src/nsDiskCacheDevice.cpp b/mozilla/netwerk/cache/src/nsDiskCacheDevice.cpp index 5b7f5531c9e..4c2631231f4 100644 --- a/mozilla/netwerk/cache/src/nsDiskCacheDevice.cpp +++ b/mozilla/netwerk/cache/src/nsDiskCacheDevice.cpp @@ -1063,7 +1063,7 @@ nsDiskCacheDevice::MoveCacheToTrash(nsIFile ** result) rv = mCacheDirectory->GetParent(getter_AddRefs(parentDir)); if (NS_FAILED(rv)) return rv; - rv = mCacheDirectory->MoveToNative(uniqueDir, EmptyCString()); + rv = mCacheDirectory->MoveToNative(uniqueDir, nsCString()); if (NS_FAILED(rv)) return rv; // set mCacheDirectory to point to parentDir/Cache/ again diff --git a/mozilla/profile/src/nsProfile.cpp b/mozilla/profile/src/nsProfile.cpp index 71b444c7412..a3b37293bf8 100644 --- a/mozilla/profile/src/nsProfile.cpp +++ b/mozilla/profile/src/nsProfile.cpp @@ -217,7 +217,7 @@ nsresult RecursiveCopy(nsIFile* srcDir, nsIFile* destDir) } } else - rv = dirEntry->CopyToNative(destDir, EmptyCString()); + rv = dirEntry->CopyToNative(destDir, nsCString()); } } diff --git a/mozilla/profile/src/nsProfileAccess.cpp b/mozilla/profile/src/nsProfileAccess.cpp index d1a6bd48134..766780f573f 100644 --- a/mozilla/profile/src/nsProfileAccess.cpp +++ b/mozilla/profile/src/nsProfileAccess.cpp @@ -1442,7 +1442,7 @@ nsresult ProfileStruct::InternalizeLocation(nsIRegistry *aRegistry, nsRegistryKe CFURLRef pathURLRef = ::CFURLCreateWithFileSystemPath(NULL, pathStrRef, kCFURLHFSPathStyle, true); if (pathURLRef) { - rv = NS_NewNativeLocalFile(EmptyCString(), PR_TRUE, getter_AddRefs(tempLocal)); + rv = NS_NewNativeLocalFile(nsCString(), PR_TRUE, getter_AddRefs(tempLocal)); if (NS_SUCCEEDED(rv)) { nsCOMPtr tempLocalMac(do_QueryInterface(tempLocal)); @@ -1467,7 +1467,7 @@ nsresult ProfileStruct::InternalizeLocation(nsIRegistry *aRegistry, nsRegistryKe regLocationData = regData; #if defined(XP_MAC) || defined(XP_MACOSX) - rv = NS_NewNativeLocalFile(EmptyCString(), PR_TRUE, getter_AddRefs(tempLocal)); + rv = NS_NewNativeLocalFile(nsCString(), PR_TRUE, getter_AddRefs(tempLocal)); if (NS_SUCCEEDED(rv)) // regLocationData is ASCII so no loss rv = tempLocal->SetPersistentDescriptor(NS_LossyConvertUCS2toASCII(regLocationData)); #else diff --git a/mozilla/webshell/tests/viewer/nsBrowserWindow.cpp b/mozilla/webshell/tests/viewer/nsBrowserWindow.cpp index a289653c9b7..2b801592ac4 100644 --- a/mozilla/webshell/tests/viewer/nsBrowserWindow.cpp +++ b/mozilla/webshell/tests/viewer/nsBrowserWindow.cpp @@ -1653,7 +1653,7 @@ nsBrowserWindow::CreateStatusBar(PRInt32 aWidth) { widget->SetForegroundColor(NS_RGB(0, 0, 0)); PRUint32 size; - mStatus->SetText(EmptyString(),size); + mStatus->SetText(nsAutoString(),size); mStatus->SetMaxTextLength(MAX_TEXT_LENGTH); nsITextWidget* textWidget = nsnull; diff --git a/mozilla/webshell/tests/viewer/nsViewerApp.cpp b/mozilla/webshell/tests/viewer/nsViewerApp.cpp index 56adaa6b36b..363e289cff0 100644 --- a/mozilla/webshell/tests/viewer/nsViewerApp.cpp +++ b/mozilla/webshell/tests/viewer/nsViewerApp.cpp @@ -1418,7 +1418,7 @@ PRBool CreateSiteDialog(nsIWidget * aParent) #endif NS_CreateLabel(mSiteDialog,mSiteLabel,rect,HandleSiteEvent,&font); mSiteLabel->SetAlignment(eAlign_Left); - mSiteLabel->SetLabel(EmptyString()); + mSiteLabel->SetLabel(nsAutoString()); y += 34; w = 75; diff --git a/mozilla/xpcom/io/nsLocalFileUnix.cpp b/mozilla/xpcom/io/nsLocalFileUnix.cpp index e030b72491f..99637011236 100644 --- a/mozilla/xpcom/io/nsLocalFileUnix.cpp +++ b/mozilla/xpcom/io/nsLocalFileUnix.cpp @@ -634,7 +634,7 @@ nsLocalFile::CopyDirectoryTo(nsIFile *newParent) if NS_FAILED((rv = IsDirectory(&dirCheck))) return rv; if (!dirCheck) - return CopyToNative(newParent, EmptyCString()); + return CopyToNative(newParent, nsCString()); if (NS_FAILED(rv = Equals(newParent, &dirCheck))) return rv; @@ -684,7 +684,7 @@ nsLocalFile::CopyDirectoryTo(nsIFile *newParent) rv = newParent->Clone(getter_AddRefs(destClone)); if (NS_SUCCEEDED(rv)) { nsCOMPtr newDir(do_QueryInterface(destClone)); - if (NS_FAILED(rv = entry->CopyToNative(newDir, EmptyCString()))) { + if (NS_FAILED(rv = entry->CopyToNative(newDir, nsCString()))) { #ifdef DEBUG nsresult rv2; nsCAutoString pathName; @@ -698,7 +698,7 @@ nsLocalFile::CopyDirectoryTo(nsIFile *newParent) } } } else { - if (NS_FAILED(rv = entry->CopyToNative(newParent, EmptyCString()))) { + if (NS_FAILED(rv = entry->CopyToNative(newParent, nsCString()))) { #ifdef DEBUG nsresult rv2; nsCAutoString pathName; diff --git a/mozilla/xpcom/tests/nsIFileTest.cpp b/mozilla/xpcom/tests/nsIFileTest.cpp index 4e1463de121..efe86e69eec 100644 --- a/mozilla/xpcom/tests/nsIFileTest.cpp +++ b/mozilla/xpcom/tests/nsIFileTest.cpp @@ -257,7 +257,7 @@ CopyTest(const char *testFile, const char *targetDir) rv = dir->InitWithNativePath(nsDependentCString(targetDir)); VerifyResult(rv); - rv = file->CopyTo(dir, EmptyString()); + rv = file->CopyTo(dir, nsString()); VerifyResult(rv); printf("end copy test\n"); diff --git a/mozilla/xpfe/appshell/src/nsAppShellService.cpp b/mozilla/xpfe/appshell/src/nsAppShellService.cpp index 7dd3f95fc65..1f8dc01096e 100644 --- a/mozilla/xpfe/appshell/src/nsAppShellService.cpp +++ b/mozilla/xpfe/appshell/src/nsAppShellService.cpp @@ -1210,7 +1210,7 @@ nsAppShellService::LaunchTask(const char *aParam, PRInt32 height, PRInt32 width, } else { - rv = OpenWindow(chromeUrlForTask, EmptyString(), width, height); + rv = OpenWindow(chromeUrlForTask, nsString(), width, height); } // If we get here without an error, then a window was opened OK. diff --git a/mozilla/xpfe/components/search/src/nsInternetSearchService.cpp b/mozilla/xpfe/components/search/src/nsInternetSearchService.cpp index 621075515b0..f3e4b0188bb 100755 --- a/mozilla/xpfe/components/search/src/nsInternetSearchService.cpp +++ b/mozilla/xpfe/components/search/src/nsInternetSearchService.cpp @@ -2754,7 +2754,7 @@ InternetSearchDataSource::FindInternetSearchResults(const char *url, PRBool *sea // look for query option which is the string the user is searching for nsAutoString userVar, inputUnused; - if (NS_FAILED(rv = GetInputs(dataUni, userVar, EmptyString(), inputUnused, 0, 0, 0))) return(rv); + if (NS_FAILED(rv = GetInputs(dataUni, userVar, nsAutoString(), inputUnused, 0, 0, 0))) return(rv); if (userVar.IsEmpty()) return(NS_RDF_NO_VALUE); nsAutoString queryStr; @@ -2879,7 +2879,7 @@ InternetSearchDataSource::FindInternetSearchResults(const char *url, PRBool *sea ClearResults(PR_FALSE); // do the search - DoSearch(nsnull, engine, searchURL, EmptyString()); + DoSearch(nsnull, engine, searchURL, nsAutoString()); *searchInProgress = PR_TRUE; } @@ -3206,7 +3206,7 @@ InternetSearchDataSource::BeginSearchRequest(nsIRDFResource *source, PRBool doNe if (doNetworkRequest) { - DoSearch(source, engine, EmptyString(), text); + DoSearch(source, engine, nsAutoString(), text); requestInitiated = PR_TRUE; } } diff --git a/mozilla/xpinstall/src/nsInstall.cpp b/mozilla/xpinstall/src/nsInstall.cpp index e95fb6c09d5..35fba3254d0 100644 --- a/mozilla/xpinstall/src/nsInstall.cpp +++ b/mozilla/xpinstall/src/nsInstall.cpp @@ -547,7 +547,7 @@ nsInstall::AddDirectory(const nsString& aRegName, PRInt32* aReturn) { return AddDirectory(aRegName, - EmptyString(), + nsAutoString(), aJarSource, aFolder, aSubdir, @@ -565,11 +565,11 @@ nsInstall::AddDirectory(const nsString& aJarSource, return NS_OK; } - return AddDirectory(EmptyString(), - EmptyString(), + return AddDirectory(nsAutoString(), + nsAutoString(), aJarSource, mPackageFolder, - EmptyString(), + nsAutoString(), INSTALL_NO_COMPARE, aReturn); } @@ -740,11 +740,11 @@ nsInstall::AddSubcomponent(const nsString& aJarSource, return NS_OK; } - return AddSubcomponent(EmptyString(), + return AddSubcomponent(nsAutoString(), version, aJarSource, mPackageFolder, - EmptyString(), + nsAutoString(), INSTALL_NO_COMPARE, aReturn); } @@ -1032,7 +1032,7 @@ nsInstall::GetComponentFolder(const nsString& aComponentName, const nsString& aS PRInt32 nsInstall::GetComponentFolder(const nsString& aComponentName, nsInstallFolder** aNewFolder) { - return GetComponentFolder(aComponentName, EmptyString(), aNewFolder); + return GetComponentFolder(aComponentName, nsAutoString(), aNewFolder); } PRInt32 @@ -1064,7 +1064,7 @@ PRInt32 nsInstall::GetFolder(const nsString& targetFolder, nsInstallFolder** aNewFolder) { /* This version of GetFolder takes an nsString object as the only param */ - return GetFolder(targetFolder, EmptyString(), aNewFolder); + return GetFolder(targetFolder, nsAutoString(), aNewFolder); } PRInt32 @@ -1348,7 +1348,7 @@ nsInstall::Patch(const nsString& aRegName, const nsString& aVersion, const nsStr PRInt32 nsInstall::Patch(const nsString& aRegName, const nsString& aJarSource, nsInstallFolder* aFolder, const nsString& aTargetName, PRInt32* aReturn) { - return Patch(aRegName, EmptyString(), aJarSource, aFolder, aTargetName, aReturn); + return Patch(aRegName, nsAutoString(), aJarSource, aFolder, aTargetName, aReturn); } PRInt32 @@ -1415,7 +1415,7 @@ nsInstall::SetPackageFolder(nsInstallFolder& aFolder) { return OUT_OF_MEMORY; } - nsresult res = folder->Init(aFolder, EmptyString()); + nsresult res = folder->Init(aFolder, nsAutoString()); if (NS_FAILED(res)) { @@ -1495,7 +1495,7 @@ nsInstall::StartInstall(const nsString& aUserPackageName, const nsString& aRegis if (mPackageFolder && packageDir) { - if (NS_FAILED( mPackageFolder->Init(packageDir, EmptyString()) )) + if (NS_FAILED( mPackageFolder->Init(packageDir, nsString()) )) { delete mPackageFolder; mPackageFolder = nsnull; @@ -1635,7 +1635,7 @@ nsInstall::FileOpDirGetParent(nsInstallFolder& aTarget, nsInstallFolder** thePar { return NS_ERROR_OUT_OF_MEMORY; } - folder->Init(parent,EmptyString()); + folder->Init(parent,nsString()); *theParentFolder = folder; } else diff --git a/mozilla/xpinstall/src/nsJSInstall.cpp b/mozilla/xpinstall/src/nsJSInstall.cpp index 8dcd4d75fba..ee7d5f2cd24 100644 --- a/mozilla/xpinstall/src/nsJSInstall.cpp +++ b/mozilla/xpinstall/src/nsJSInstall.cpp @@ -119,7 +119,7 @@ GetInstallProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp) nsInstallFolder* folder = new nsInstallFolder(); if ( folder ) { - folder->Init(a->GetJarFileLocation(),EmptyString()); + folder->Init(a->GetJarFileLocation(),nsString()); JSObject* fileSpecObject = JS_NewObject(cx, &FileSpecObjectClass, gFileSpecProto, NULL);