diff --git a/accessible/src/html/nsHTMLFormControlAccessible.cpp b/accessible/src/html/nsHTMLFormControlAccessible.cpp index 3e7ed1b5abdb..08acae95aea5 100644 --- a/accessible/src/html/nsHTMLFormControlAccessible.cpp +++ b/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.Assign(NS_LITERAL_STRING("")); // Default name is blank + _retval.Truncate(); // Default name is blank return AppendFlatStringFromSubtree(legendContent, &_retval); } } diff --git a/accessible/src/html/nsHTMLTableAccessible.cpp b/accessible/src/html/nsHTMLTableAccessible.cpp index 3ff783ea402e..5f258b2b4b80 100644 --- a/accessible/src/html/nsHTMLTableAccessible.cpp +++ b/accessible/src/html/nsHTMLTableAccessible.cpp @@ -78,7 +78,7 @@ nsHTMLTableCaptionAccessible::GetState(PRUint32 *aResult) NS_IMETHODIMP nsHTMLTableCaptionAccessible::GetValue(nsAString& aResult) { - aResult.Assign(NS_LITERAL_STRING("")); // Default name is blank + aResult.Truncate(); // 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.Assign(NS_LITERAL_STRING("")); // Default name is blank + aResult.Truncate(); // Default name is blank nsCOMPtr element(do_QueryInterface(mDOMNode)); if (element) { diff --git a/accessible/src/xul/nsXULFormControlAccessible.cpp b/accessible/src/xul/nsXULFormControlAccessible.cpp index 1d11b602d318..7f0f710c314d 100644 --- a/accessible/src/xul/nsXULFormControlAccessible.cpp +++ b/accessible/src/xul/nsXULFormControlAccessible.cpp @@ -404,7 +404,7 @@ NS_IMETHODIMP nsXULGroupboxAccessible::GetState(PRUint32 *_retval) NS_IMETHODIMP nsXULGroupboxAccessible::GetName(nsAString& _retval) { - _retval.Assign(NS_LITERAL_STRING("")); // Default name is blank + _retval.Truncate(); // Default name is blank nsCOMPtr element(do_QueryInterface(mDOMNode)); if (element) { diff --git a/accessible/src/xul/nsXULMenuAccessible.cpp b/accessible/src/xul/nsXULMenuAccessible.cpp index 4c472704c0fa..5208a96b1afb 100644 --- a/accessible/src/xul/nsXULMenuAccessible.cpp +++ b/accessible/src/xul/nsXULMenuAccessible.cpp @@ -274,7 +274,7 @@ NS_IMETHODIMP nsXULMenuSeparatorAccessible::GetState(PRUint32 *_retval) NS_IMETHODIMP nsXULMenuSeparatorAccessible::GetName(nsAString& _retval) { - _retval.Assign(NS_LITERAL_STRING("")); + _retval.Truncate(); return NS_OK; } diff --git a/content/base/src/mozSanitizingSerializer.cpp b/content/base/src/mozSanitizingSerializer.cpp index d37f2544aba6..c31f1b5c7ec8 100644 --- a/content/base/src/mozSanitizingSerializer.cpp +++ b/content/base/src/mozSanitizingSerializer.cpp @@ -257,7 +257,7 @@ mozSanitizingHTMLSerializer::AppendElementStart(nsIDOMElement *aElement, rv = DoOpenContainer(id); } else { - rv = DoAddLeaf(id, nsString()); + rv = DoAddLeaf(id, EmptyString()); } mContent = 0; diff --git a/content/base/src/nsDocument.cpp b/content/base/src/nsDocument.cpp index 344e786a4b3c..2ae34d76a82f 100644 --- a/content/base/src/nsDocument.cpp +++ b/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, nsString()); + aPublicId, aSystemId, EmptyString()); } NS_IMETHODIMP @@ -1017,7 +1017,7 @@ nsDocument::GetLineBreaker() do_GetService(NS_LWBRK_CONTRACTID, &rv); NS_ENSURE_SUCCESS(rv, nsnull); - lbf->GetBreaker(nsString(), getter_AddRefs(mLineBreaker)); + lbf->GetBreaker(EmptyString(), 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(nsString(), getter_AddRefs(mWordBreaker)); + wbf->GetBreaker(EmptyString(), getter_AddRefs(mWordBreaker)); NS_ENSURE_TRUE(wbf, nsnull); } diff --git a/content/base/src/nsHTMLContentSerializer.cpp b/content/base/src/nsHTMLContentSerializer.cpp index fd7787276ae5..030e9c7e73ad 100644 --- a/content/base/src/nsHTMLContentSerializer.cpp +++ b/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(nsString(), getter_AddRefs(mLineBreaker)); + rv = lf->GetBreaker(EmptyString(), 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(nsAutoString(), nameStr, valueStr, aStr, !isJS); + SerializeAttr(EmptyString(), 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(nsAutoString(), NS_LITERAL_STRING("value"), valueStr, aStr, PR_FALSE); + SerializeAttr(EmptyString(), 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(nsAutoString(), NS_LITERAL_STRING("value"), valueStr, aStr, PR_FALSE); + SerializeAttr(EmptyString(), NS_LITERAL_STRING("value"), valueStr, aStr, PR_FALSE); } } diff --git a/content/base/src/nsXMLContentSerializer.cpp b/content/base/src/nsXMLContentSerializer.cpp index 9ecb6253892e..7d3c5491c1a6 100644 --- a/content/base/src/nsXMLContentSerializer.cpp +++ b/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(nsString(), uriStr, aElement); + PushNameSpaceDecl(EmptyString(), uriStr, aElement); } else { attrName->ToString(nameStr); PushNameSpaceDecl(nameStr, uriStr, aElement); diff --git a/content/html/content/src/nsHTMLInputElement.cpp b/content/html/content/src/nsHTMLInputElement.cpp index 6a20cdbb5600..678726e8e666 100644 --- a/content/html/content/src/nsHTMLInputElement.cpp +++ b/content/html/content/src/nsHTMLInputElement.cpp @@ -1201,7 +1201,7 @@ nsHTMLInputElement::SelectAll(nsIPresContext* aPresContext) if (formControlFrame) { formControlFrame->SetProperty(aPresContext, nsHTMLAtoms::select, - nsAutoString()); + EmptyString()); } } diff --git a/content/html/content/src/nsHTMLTextAreaElement.cpp b/content/html/content/src/nsHTMLTextAreaElement.cpp index 59ad392259b0..fdd548d81cb4 100644 --- a/content/html/content/src/nsHTMLTextAreaElement.cpp +++ b/content/html/content/src/nsHTMLTextAreaElement.cpp @@ -329,7 +329,7 @@ nsHTMLTextAreaElement::SelectAll(nsIPresContext* aPresContext) if (formControlFrame) { formControlFrame->SetProperty(aPresContext, nsHTMLAtoms::select, - nsString()); + EmptyString()); } return NS_OK; diff --git a/content/html/document/src/nsHTMLDocument.cpp b/content/html/document/src/nsHTMLDocument.cpp index b358ffd2440a..b1c43701b925 100644 --- a/content/html/document/src/nsHTMLDocument.cpp +++ b/content/html/document/src/nsHTMLDocument.cpp @@ -2380,7 +2380,7 @@ nsHTMLDocument::ScriptWriteCommon(PRBool aNewlineTerminate) } // No arguments... - return WriteCommon(nsString(), aNewlineTerminate); + return WriteCommon(EmptyString(), aNewlineTerminate); } NS_IMETHODIMP diff --git a/content/html/style/src/nsCSSScanner.cpp b/content/html/style/src/nsCSSScanner.cpp index 5bf607198b35..7ffbd315887c 100644 --- a/content/html/style/src/nsCSSScanner.cpp +++ b/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(), - NS_LITERAL_STRING("").get(), + EmptyString().get(), mErrorLineNumber, mErrorColNumber, 0, diff --git a/dom/src/base/nsGlobalWindow.cpp b/dom/src/base/nsGlobalWindow.cpp index cdbf883118fd..ebda7a1bc0c3 100644 --- a/dom/src/base/nsGlobalWindow.cpp +++ b/dom/src/base/nsGlobalWindow.cpp @@ -526,8 +526,8 @@ GlobalWindowImpl::SetNewDocument(nsIDOMDocument* aDocument, than going away. See bug 61840. */ if (mDocShell && aDocument) { - SetStatus(nsString()); - SetDefaultStatus(nsString()); + SetStatus(EmptyString()); + SetDefaultStatus(EmptyString()); } if (mDocument) { diff --git a/editor/libeditor/html/TypeInState.cpp b/editor/libeditor/html/TypeInState.cpp index 3f8d3be9fa25..cd8c339bb3e2 100644 --- a/editor/libeditor/html/TypeInState.cpp +++ b/editor/libeditor/html/TypeInState.cpp @@ -158,12 +158,12 @@ void TypeInState::Reset() nsresult TypeInState::SetProp(nsIAtom *aProp) { - return SetProp(aProp,nsAutoString(),nsAutoString()); + return SetProp(aProp,EmptyString(),EmptyString()); } nsresult TypeInState::SetProp(nsIAtom *aProp, const nsString &aAttr) { - return SetProp(aProp,aAttr,nsAutoString()); + return SetProp(aProp,aAttr,EmptyString()); } 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,nsAutoString()); + return ClearProp(nsnull,EmptyString()); } nsresult TypeInState::ClearProp(nsIAtom *aProp) { - return ClearProp(aProp,nsAutoString()); + return ClearProp(aProp,EmptyString()); } 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, nsAutoString(), nsnull); + return GetTypingState(isSet, theSetting, aProp, EmptyString(), nsnull); } nsresult TypeInState::GetTypingState(PRBool &isSet, diff --git a/editor/libeditor/html/nsHTMLEditRules.cpp b/editor/libeditor/html/nsHTMLEditRules.cpp index 729f5677dccc..d596e4bec1fa 100644 --- a/editor/libeditor/html/nsHTMLEditRules.cpp +++ b/editor/libeditor/html/nsHTMLEditRules.cpp @@ -4303,7 +4303,7 @@ nsHTMLEditRules::CreateStyleForInsertText(nsISelection *aSelection, nsIDOMDocume } nsCOMPtr newNode; nsCOMPtr nodeAsText; - res = aDoc->CreateTextNode(nsAutoString(), getter_AddRefs(nodeAsText)); + res = aDoc->CreateTextNode(EmptyString(), getter_AddRefs(nodeAsText)); if (NS_FAILED(res)) return res; if (!nodeAsText) return NS_ERROR_NULL_POINTER; newNode = do_QueryInterface(nodeAsText); diff --git a/editor/libeditor/html/nsHTMLEditor.cpp b/editor/libeditor/html/nsHTMLEditor.cpp index 65f3c25535e7..6b6a52721b7a 100644 --- a/editor/libeditor/html/nsHTMLEditor.cpp +++ b/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.Assign(NS_LITERAL_STRING("")); + aOutColor.Truncate(); 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"), nsAutoString()); + newElement->SetAttribute(NS_LITERAL_STRING("_moz_dirty"), EmptyString()); // 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(NS_LITERAL_STRING(""), getter_AddRefs(focusElement)); + res = GetSelectedElement(EmptyString(), getter_AddRefs(focusElement)); if (NS_FAILED(res)) return res; if (focusElement) focusNode = do_QueryInterface(focusElement); diff --git a/editor/libeditor/html/nsHTMLEditorStyle.cpp b/editor/libeditor/html/nsHTMLEditorStyle.cpp index fab826c329a3..4511cb0670ef 100644 --- a/editor/libeditor/html/nsHTMLEditorStyle.cpp +++ b/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, nsAutoString(), nsAutoString()); + return mTypeInState->SetProp(atom, EmptyString(), EmptyString()); } // wrap with txn batching, rules sniffing, and selection preservation code diff --git a/editor/libeditor/html/nsHTMLObjectResizer.cpp b/editor/libeditor/html/nsHTMLObjectResizer.cpp index 04a0733b6f0f..894bc5e6d9ba 100644 --- a/editor/libeditor/html/nsHTMLObjectResizer.cpp +++ b/editor/libeditor/html/nsHTMLObjectResizer.cpp @@ -1044,12 +1044,12 @@ nsHTMLEditor::SetFinalSize(PRInt32 aX, PRInt32 aY) if (setWidth) mHTMLCSSUtils->RemoveCSSProperty(mResizedObject, nsEditProperty::cssWidth, - NS_LITERAL_STRING(""), + EmptyString(), PR_FALSE); if (setHeight) mHTMLCSSUtils->RemoveCSSProperty(mResizedObject, nsEditProperty::cssHeight, - NS_LITERAL_STRING(""), + EmptyString(), PR_FALSE); } // finally notify the listeners if any diff --git a/embedding/browser/powerplant/source/CAppFileLocationProvider.cpp b/embedding/browser/powerplant/source/CAppFileLocationProvider.cpp index 2b9ebeb1b4b5..fc61f8ee0bcd 100755 --- a/embedding/browser/powerplant/source/CAppFileLocationProvider.cpp +++ b/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(nsString(), PR_TRUE, getter_AddRefs(localDir)); + NS_NewLocalFile(EmptyString(), PR_TRUE, getter_AddRefs(localDir)); if (!localDir) return NS_ERROR_FAILURE; nsCOMPtr localDirMac(do_QueryInterface(localDir)); rv = localDirMac->InitWithFSRef(&fsRef); diff --git a/embedding/browser/powerplant/source/CBrowserShell.cpp b/embedding/browser/powerplant/source/CBrowserShell.cpp index 31cbfa3de14a..2dcc53d5f1df 100644 --- a/embedding/browser/powerplant/source/CBrowserShell.cpp +++ b/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, nsString(), false, inSaveFormat); // don't bypass cache + return SaveInternal(documentURI, domDocument, EmptyString(), false, inSaveFormat); // don't bypass cache } // Save link target NS_METHOD CBrowserShell::SaveLink(nsIURI* inURI) { - return SaveInternal(inURI, nsnull, nsString(), true, eSaveFormatHTML); // bypass cache + return SaveInternal(inURI, nsnull, EmptyString(), true, eSaveFormatHTML); // bypass cache } const char* const kPersistContractID = "@mozilla.org/embedding/browser/nsWebBrowserPersist;1"; diff --git a/extensions/pref/autoconfig/src/nsLDAPSyncQuery.cpp b/extensions/pref/autoconfig/src/nsLDAPSyncQuery.cpp index 7eb3706def6c..6f6966bf94c7 100644 --- a/extensions/pref/autoconfig/src/nsLDAPSyncQuery.cpp +++ b/extensions/pref/autoconfig/src/nsLDAPSyncQuery.cpp @@ -164,7 +164,7 @@ nsLDAPSyncQuery::OnLDAPInit(nsILDAPConnection *aConn, nsresult aStatus) // kick off a bind operation // - rv = mOperation->SimpleBind(nsCString()); + rv = mOperation->SimpleBind(EmptyCString()); 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, nsCString(), selfProxy, + ? PR_TRUE : PR_FALSE, EmptyCString(), selfProxy, nsnull, mProtocolVersion); if (NS_FAILED(rv)) { FinishLDAPQuery(); diff --git a/extensions/spellcheck/myspell/src/myspAffixmgr.cpp b/extensions/spellcheck/myspell/src/myspAffixmgr.cpp index 14c0ff5ab3e3..d398c379a304 100644 --- a/extensions/spellcheck/myspell/src/myspAffixmgr.cpp +++ b/extensions/spellcheck/myspell/src/myspAffixmgr.cpp @@ -520,7 +520,7 @@ nsresult myspAffixMgr::DecodeString(const nsAFlatCString &aSource, nsAString &aDest) { if (!mDecoder) { - aDest.Assign(NS_LITERAL_STRING("")); + aDest.Truncate(); return NS_OK; } PRInt32 inLength = aSource.Length(); diff --git a/extensions/transformiix/source/xml/dom/standalone/Attr.cpp b/extensions/transformiix/source/xml/dom/standalone/Attr.cpp index 1f1c818c508b..1efe0683c626 100644 --- a/extensions/transformiix/source/xml/dom/standalone/Attr.cpp +++ b/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, nsString(), owner) + NodeDefinition(Node::ATTRIBUTE_NODE, name, EmptyString(), 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, nsString(), aOwner) + NodeDefinition(Node::ATTRIBUTE_NODE, aName, EmptyString(), aOwner) { if (aNamespaceURI.IsEmpty()) mNamespaceID = kNameSpaceID_None; diff --git a/extensions/transformiix/source/xml/dom/standalone/Document.cpp b/extensions/transformiix/source/xml/dom/standalone/Document.cpp index e75f8302853e..8d981e5ebaaf 100644 --- a/extensions/transformiix/source/xml/dom/standalone/Document.cpp +++ b/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, nsString(), NULL) +Document::Document() : NodeDefinition(Node::DOCUMENT_NODE, EmptyString(), NULL) { mIDMap.Init(0); documentElement = nsnull; diff --git a/extensions/transformiix/source/xml/dom/standalone/Element.cpp b/extensions/transformiix/source/xml/dom/standalone/Element.cpp index e80a43f7725d..a9e64c723c7a 100644 --- a/extensions/transformiix/source/xml/dom/standalone/Element.cpp +++ b/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, nsString(), owner) + NodeDefinition(Node::ELEMENT_NODE, tagName, EmptyString(), 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, nsString(), aOwner) + NodeDefinition(Node::ELEMENT_NODE, aTagName, EmptyString(), aOwner) { Element(aTagName, aOwner); if (aNamespaceURI.IsEmpty()) diff --git a/extensions/transformiix/source/xml/dom/standalone/dom.h b/extensions/transformiix/source/xml/dom/standalone/dom.h index 5702c0bb287e..8aaa52129c54 100644 --- a/extensions/transformiix/source/xml/dom/standalone/dom.h +++ b/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, nsString(), aOwner) + NodeDefinition(Node::DOCUMENT_FRAGMENT_NODE, EmptyString(), aOwner) { }; }; diff --git a/extensions/transformiix/source/xslt/txHTMLOutput.cpp b/extensions/transformiix/source/xslt/txHTMLOutput.cpp index 5c3d4adecd4d..f2396256bf2e 100644 --- a/extensions/transformiix/source/xslt/txHTMLOutput.cpp +++ b/extensions/transformiix/source/xslt/txHTMLOutput.cpp @@ -225,7 +225,7 @@ void txHTMLOutput::attribute(const nsAString& aName, } } if (!setAtt) { - setAtt = new txOutAttr(aNsID, localName, nsString()); + setAtt = new txOutAttr(aNsID, localName, EmptyString()); setAtt->mShorthand = MB_TRUE; mAttributes.add(setAtt); } diff --git a/extensions/transformiix/source/xslt/txInstructions.cpp b/extensions/transformiix/source/xslt/txInstructions.cpp index 649ad92f578e..1306c8297301 100644 --- a/extensions/transformiix/source/xslt/txInstructions.cpp +++ b/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(nsString(), PR_FALSE); + aEs.mResultHandler->characters(EmptyString(), PR_FALSE); } rv = aEs.pushString(name); diff --git a/extensions/transformiix/source/xslt/txMozillaTextOutput.cpp b/extensions/transformiix/source/xslt/txMozillaTextOutput.cpp index c3cf0b80c037..9a440f6ff4ff 100644 --- a/extensions/transformiix/source/xslt/txMozillaTextOutput.cpp +++ b/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(nsString(), + nsresult rv = doc->CreateTextNode(EmptyString(), 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(nsString()); + nsDoc->SetTitle(EmptyString()); } // Reset and set up document @@ -293,7 +293,7 @@ void txMozillaTextOutput::createResultDocument(nsIDOMDocument* aSourceDocument, } nsCOMPtr textNode; - mDocument->CreateTextNode(nsString(), + mDocument->CreateTextNode(EmptyString(), getter_AddRefs(textNode)); NS_ASSERTION(textNode, "Failed to create the text node"); if (!textNode) { diff --git a/extensions/transformiix/source/xslt/txMozillaXMLOutput.cpp b/extensions/transformiix/source/xslt/txMozillaXMLOutput.cpp index 0b6b3434a247..bf6e2a39b395 100644 --- a/extensions/transformiix/source/xslt/txMozillaXMLOutput.cpp +++ b/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(nsString(), lowerName, + element->SetAttributeNS(EmptyString(), lowerName, aValue); } else { @@ -202,7 +202,7 @@ void txMozillaXMLOutput::endDocument() if (mCreatingNewDocument && !mHaveTitleElement) { nsCOMPtr domDoc = do_QueryInterface(mDocument); if (domDoc) { - domDoc->SetTitle(nsString()); + domDoc->SetTitle(EmptyString()); } } diff --git a/extensions/transformiix/source/xslt/txMozillaXSLTProcessor.cpp b/extensions/transformiix/source/xslt/txMozillaXSLTProcessor.cpp index 92afc19a3cd4..3cdbec2bca55 100644 --- a/extensions/transformiix/source/xslt/txMozillaXSLTProcessor.cpp +++ b/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, nsString().get(), + sbs->FormatStatusMessage(aResult, EmptyString().get(), getter_Copies(errorText)); nsXPIDLString errorMessage; diff --git a/extensions/transformiix/source/xslt/txUnknownHandler.cpp b/extensions/transformiix/source/xslt/txUnknownHandler.cpp index 4e3baa65d035..cf52ee6d19db 100644 --- a/extensions/transformiix/source/xslt/txUnknownHandler.cpp +++ b/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, nsString(), + nsresult rv = createHandlerAndFlush(eXMLOutput, EmptyString(), kNameSpaceID_None); if (NS_FAILED(rv)) return; diff --git a/extensions/xmlterm/base/mozLineTerm.cpp b/extensions/xmlterm/base/mozLineTerm.cpp index 526860fe1cbc..d61d4aee8772 100644 --- a/extensions/xmlterm/base/mozLineTerm.cpp +++ b/extensions/xmlterm/base/mozLineTerm.cpp @@ -121,7 +121,7 @@ mozLineTerm::mozLineTerm() : mSuspended(PR_FALSE), mEchoFlag(PR_TRUE), mObserver(nsnull), - mCookie(nsAutoString()), + mCookie(EmptyString()), mLastTime(LL_ZERO) { mLTerm = lterm_new(); diff --git a/extensions/xmlterm/base/mozXMLTerminal.cpp b/extensions/xmlterm/base/mozXMLTerminal.cpp index eaebe5ad7463..b0608dc1cb1b 100644 --- a/extensions/xmlterm/base/mozXMLTerminal.cpp +++ b/extensions/xmlterm/base/mozXMLTerminal.cpp @@ -102,12 +102,12 @@ NS_IMPL_THREADSAFE_ISUPPORTS4(mozXMLTerminal, mozXMLTerminal::mozXMLTerminal() : mInitialized(PR_FALSE), - mCookie(nsAutoString()), + mCookie(EmptyString()), - mCommand(nsAutoString()), - mPromptExpr(nsAutoString()), + mCommand(EmptyString()), + mPromptExpr(EmptyString()), - mInitInput(nsAutoString()), + mInitInput(EmptyString()), mXMLTermShell(nsnull), mDocShell(nsnull), diff --git a/layout/forms/nsButtonFrameRenderer.cpp b/layout/forms/nsButtonFrameRenderer.cpp index e992d4534125..ef3cf812014c 100644 --- a/layout/forms/nsButtonFrameRenderer.cpp +++ b/layout/forms/nsButtonFrameRenderer.cpp @@ -78,7 +78,7 @@ void nsButtonFrameRenderer::SetDisabled(PRBool aDisabled, PRBool notify) { if (aDisabled) - mFrame->GetContent()->SetAttr(kNameSpaceID_None, nsHTMLAtoms::disabled, nsString(), + mFrame->GetContent()->SetAttr(kNameSpaceID_None, nsHTMLAtoms::disabled, EmptyString(), notify); else mFrame->GetContent()->UnsetAttr(kNameSpaceID_None, nsHTMLAtoms::disabled, notify); diff --git a/layout/html/forms/src/nsButtonFrameRenderer.cpp b/layout/html/forms/src/nsButtonFrameRenderer.cpp index e992d4534125..ef3cf812014c 100644 --- a/layout/html/forms/src/nsButtonFrameRenderer.cpp +++ b/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, nsString(), + mFrame->GetContent()->SetAttr(kNameSpaceID_None, nsHTMLAtoms::disabled, EmptyString(), notify); else mFrame->GetContent()->UnsetAttr(kNameSpaceID_None, nsHTMLAtoms::disabled, notify); diff --git a/layout/style/nsCSSScanner.cpp b/layout/style/nsCSSScanner.cpp index 5bf607198b35..7ffbd315887c 100644 --- a/layout/style/nsCSSScanner.cpp +++ b/layout/style/nsCSSScanner.cpp @@ -260,7 +260,7 @@ void nsCSSScanner::OutputError() PRUnichar *error = ToNewUnicode(mError); rv = errorObject->Init(error, NS_ConvertASCIItoUCS2(mFileName.get()).get(), - NS_LITERAL_STRING("").get(), + EmptyString().get(), mErrorLineNumber, mErrorColNumber, 0, diff --git a/layout/xul/base/src/nsSplitterFrame.cpp b/layout/xul/base/src/nsSplitterFrame.cpp index a309f5de8813..49735c6a3e33 100644 --- a/layout/xul/base/src/nsSplitterFrame.cpp +++ b/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, nsAutoString(), PR_TRUE); + mOuter->mContent->SetAttr(kNameSpaceID_None, nsXULAtoms::state, EmptyString(), PR_TRUE); mPressed = PR_FALSE; diff --git a/mailnews/base/util/nsMsgIncomingServer.cpp b/mailnews/base/util/nsMsgIncomingServer.cpp index 32b2cd334a56..f5994689cc5d 100644 --- a/mailnews/base/util/nsMsgIncomingServer.cpp +++ b/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, nsString(), nsString(), + rv = passwordMgrInt->FindPasswordEntry(currServerUri, EmptyString(), EmptyString(), hostFound, userNameFound, passwordFound); if (NS_FAILED(rv)) { diff --git a/mailnews/imap/src/nsImapMailFolder.cpp b/mailnews/imap/src/nsImapMailFolder.cpp index 94cf92f6f896..97f456d8e17a 100644 --- a/mailnews/imap/src/nsImapMailFolder.cpp +++ b/mailnews/imap/src/nsImapMailFolder.cpp @@ -178,7 +178,7 @@ nsresult RecursiveCopy(nsIFile* srcDir, nsIFile* destDir) } } else - rv = dirEntry->CopyTo(destDir, nsString()); + rv = dirEntry->CopyTo(destDir, EmptyString()); } } diff --git a/mailnews/local/src/nsMovemailService.cpp b/mailnews/local/src/nsMovemailService.cpp index 2e66eed80894..4f0f28c74383 100644 --- a/mailnews/local/src/nsMovemailService.cpp +++ b/mailnews/local/src/nsMovemailService.cpp @@ -278,7 +278,7 @@ LocateSpoolFile(nsACString & spoolPath) nsresult rv; nsCOMPtr spoolFile; - rv = NS_NewNativeLocalFile(nsCString(), PR_TRUE, getter_AddRefs(spoolFile)); + rv = NS_NewNativeLocalFile(EmptyCString(), PR_TRUE, getter_AddRefs(spoolFile)); NS_ENSURE_SUCCESS(rv, rv); char * mailEnv = PR_GetEnv("MAIL"); diff --git a/mailnews/local/src/nsNoIncomingServer.cpp b/mailnews/local/src/nsNoIncomingServer.cpp index 7e2095d17be9..c0c469f255f8 100644 --- a/mailnews/local/src/nsNoIncomingServer.cpp +++ b/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, nsString()); + rv = defaultMessagesFile->CopyTo(localParentDir, EmptyString()); if (NS_FAILED(rv)) return rv; } return NS_OK; diff --git a/modules/libpref/src/nsPrefBranch.cpp b/modules/libpref/src/nsPrefBranch.cpp index fb11ad3f7d04..67f14066d3cf 100644 --- a/modules/libpref/src/nsPrefBranch.cpp +++ b/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(nsCString(), PR_TRUE, getter_AddRefs(theFile)); + rv = NS_NewNativeLocalFile(EmptyCString(), PR_TRUE, getter_AddRefs(theFile)); if (NS_FAILED(rv)) return rv; rv = theFile->SetRelativeDescriptor(fromFile, Substring(++keyEnd, strEnd)); diff --git a/modules/oji/src/nsJVMAuthTools.cpp b/modules/oji/src/nsJVMAuthTools.cpp index 196c9d3ca785..8e93c51d5515 100644 --- a/modules/oji/src/nsJVMAuthTools.cpp +++ b/modules/oji/src/nsJVMAuthTools.cpp @@ -211,7 +211,7 @@ nsJVMAuthTools::SetAuthenticationInfo(const char* protocol, schemeString, realmString, EmptyCString(), - nsString(), + EmptyString(), NS_ConvertUTF8toUCS2(username), NS_ConvertUTF8toUCS2(password)); return rv; diff --git a/modules/oji/src/nsJVMConfigManagerUnix.cpp b/modules/oji/src/nsJVMConfigManagerUnix.cpp index 042fc519bdcd..e9567fe21503 100644 --- a/modules/oji/src/nsJVMConfigManagerUnix.cpp +++ b/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, nsString(), arch, path, - mozPluginPath, nsString()); + config = new nsJVMConfig(version, type, EmptyString(), arch, path, + mozPluginPath, EmptyString()); NS_ENSURE_TRUE(config, NS_ERROR_OUT_OF_MEMORY); mJVMConfigList.Put(&key, NS_STATIC_CAST(void *, config)); NS_ADDREF(config); diff --git a/netwerk/cache/src/nsDiskCacheDevice.cpp b/netwerk/cache/src/nsDiskCacheDevice.cpp index 4c2631231f4f..5b7f5531c9e3 100644 --- a/netwerk/cache/src/nsDiskCacheDevice.cpp +++ b/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, nsCString()); + rv = mCacheDirectory->MoveToNative(uniqueDir, EmptyCString()); if (NS_FAILED(rv)) return rv; // set mCacheDirectory to point to parentDir/Cache/ again diff --git a/profile/src/nsProfile.cpp b/profile/src/nsProfile.cpp index a3b37293bf87..71b444c7412f 100644 --- a/profile/src/nsProfile.cpp +++ b/profile/src/nsProfile.cpp @@ -217,7 +217,7 @@ nsresult RecursiveCopy(nsIFile* srcDir, nsIFile* destDir) } } else - rv = dirEntry->CopyToNative(destDir, nsCString()); + rv = dirEntry->CopyToNative(destDir, EmptyCString()); } } diff --git a/profile/src/nsProfileAccess.cpp b/profile/src/nsProfileAccess.cpp index 766780f573fc..d1a6bd481342 100644 --- a/profile/src/nsProfileAccess.cpp +++ b/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(nsCString(), PR_TRUE, getter_AddRefs(tempLocal)); + rv = NS_NewNativeLocalFile(EmptyCString(), 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(nsCString(), PR_TRUE, getter_AddRefs(tempLocal)); + rv = NS_NewNativeLocalFile(EmptyCString(), 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/webshell/tests/viewer/nsBrowserWindow.cpp b/webshell/tests/viewer/nsBrowserWindow.cpp index 2b801592ac44..a289653c9b7e 100644 --- a/webshell/tests/viewer/nsBrowserWindow.cpp +++ b/webshell/tests/viewer/nsBrowserWindow.cpp @@ -1653,7 +1653,7 @@ nsBrowserWindow::CreateStatusBar(PRInt32 aWidth) { widget->SetForegroundColor(NS_RGB(0, 0, 0)); PRUint32 size; - mStatus->SetText(nsAutoString(),size); + mStatus->SetText(EmptyString(),size); mStatus->SetMaxTextLength(MAX_TEXT_LENGTH); nsITextWidget* textWidget = nsnull; diff --git a/webshell/tests/viewer/nsViewerApp.cpp b/webshell/tests/viewer/nsViewerApp.cpp index 363e289cff06..56adaa6b36b5 100644 --- a/webshell/tests/viewer/nsViewerApp.cpp +++ b/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(nsAutoString()); + mSiteLabel->SetLabel(EmptyString()); y += 34; w = 75; diff --git a/xpcom/io/SpecialSystemDirectory.cpp b/xpcom/io/SpecialSystemDirectory.cpp index d211eb3f8e9d..8d057fa241aa 100644 --- a/xpcom/io/SpecialSystemDirectory.cpp +++ b/xpcom/io/SpecialSystemDirectory.cpp @@ -756,7 +756,7 @@ GetOSXFolderType(short aDomain, OSType aFolderType, nsILocalFile **localFile) err = ::FSFindFolder(aDomain, aFolderType, kCreateFolder, &fsRef); if (err == noErr) { - NS_NewLocalFile(nsString(), PR_TRUE, localFile); + NS_NewLocalFile(EmptyString(), PR_TRUE, localFile); nsCOMPtr localMacFile(do_QueryInterface(*localFile)); if (localMacFile) rv = localMacFile->InitWithFSRef(&fsRef); diff --git a/xpcom/io/nsAppFileLocationProvider.cpp b/xpcom/io/nsAppFileLocationProvider.cpp index e5bd98016807..1fee21c96bab 100755 --- a/xpcom/io/nsAppFileLocationProvider.cpp +++ b/xpcom/io/nsAppFileLocationProvider.cpp @@ -353,7 +353,7 @@ NS_METHOD nsAppFileLocationProvider::GetProductDirectory(nsILocalFile **aLocalFi FSRef fsRef; OSErr err = ::FSFindFolder(kUserDomain, kDomainLibraryFolderType, kCreateFolder, &fsRef); if (err) return NS_ERROR_FAILURE; - NS_NewLocalFile(nsString(), PR_TRUE, getter_AddRefs(localDir)); + NS_NewLocalFile(EmptyString(), PR_TRUE, getter_AddRefs(localDir)); if (!localDir) return NS_ERROR_FAILURE; nsCOMPtr localDirMac(do_QueryInterface(localDir)); rv = localDirMac->InitWithFSRef(&fsRef); diff --git a/xpcom/io/nsDirectoryService.cpp b/xpcom/io/nsDirectoryService.cpp index ba106da4bbf3..ef0705ebf385 100644 --- a/xpcom/io/nsDirectoryService.cpp +++ b/xpcom/io/nsDirectoryService.cpp @@ -878,7 +878,7 @@ nsDirectoryService::GetFile(const char *prop, PRBool *persistent, nsIFile **_ret } else if (inAtom == nsDirectoryService::sDefaultDownloadDirectory) { - NS_NewLocalFile(nsString(), PR_TRUE, getter_AddRefs(localFile)); + NS_NewLocalFile(EmptyString(), PR_TRUE, getter_AddRefs(localFile)); nsCOMPtr localMacFile(do_QueryInterface(localFile)); if (localMacFile) diff --git a/xpcom/io/nsLocalFileUnix.cpp b/xpcom/io/nsLocalFileUnix.cpp index 99637011236c..e030b72491f8 100644 --- a/xpcom/io/nsLocalFileUnix.cpp +++ b/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, nsCString()); + return CopyToNative(newParent, EmptyCString()); 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, nsCString()))) { + if (NS_FAILED(rv = entry->CopyToNative(newDir, EmptyCString()))) { #ifdef DEBUG nsresult rv2; nsCAutoString pathName; @@ -698,7 +698,7 @@ nsLocalFile::CopyDirectoryTo(nsIFile *newParent) } } } else { - if (NS_FAILED(rv = entry->CopyToNative(newParent, nsCString()))) { + if (NS_FAILED(rv = entry->CopyToNative(newParent, EmptyCString()))) { #ifdef DEBUG nsresult rv2; nsCAutoString pathName; diff --git a/xpcom/reflect/xptinfo/src/xptiManifest.cpp b/xpcom/reflect/xptinfo/src/xptiManifest.cpp index 71d9c2b420e0..50bbac89a835 100644 --- a/xpcom/reflect/xptinfo/src/xptiManifest.cpp +++ b/xpcom/reflect/xptinfo/src/xptiManifest.cpp @@ -76,7 +76,7 @@ CurrentAppDirMatchesPersistentDescriptor(xptiInterfaceInfoManager* aMgr, aMgr->GetApplicationDir(getter_AddRefs(appDir)); nsCOMPtr descDir; - nsresult rv = NS_NewNativeLocalFile(nsCString(), PR_FALSE, getter_AddRefs(descDir)); + nsresult rv = NS_NewNativeLocalFile(EmptyCString(), PR_FALSE, getter_AddRefs(descDir)); if(NS_FAILED(rv)) return PR_FALSE; diff --git a/xpcom/reflect/xptinfo/src/xptiWorkingSet.cpp b/xpcom/reflect/xptinfo/src/xptiWorkingSet.cpp index e9d13ba90cfe..b9602726784f 100644 --- a/xpcom/reflect/xptinfo/src/xptiWorkingSet.cpp +++ b/xpcom/reflect/xptinfo/src/xptiWorkingSet.cpp @@ -417,7 +417,7 @@ PRBool xptiWorkingSet::DirectoryAtMatchesPersistentDescriptor(PRUint32 i, return PR_FALSE; nsCOMPtr descDir; - nsresult rv = NS_NewNativeLocalFile(nsCString(), PR_FALSE, getter_AddRefs(descDir)); + nsresult rv = NS_NewNativeLocalFile(EmptyCString(), PR_FALSE, getter_AddRefs(descDir)); if(NS_FAILED(rv)) return PR_FALSE; diff --git a/xpcom/tests/nsIFileTest.cpp b/xpcom/tests/nsIFileTest.cpp index efe86e69eec4..4e1463de121e 100644 --- a/xpcom/tests/nsIFileTest.cpp +++ b/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, nsString()); + rv = file->CopyTo(dir, EmptyString()); VerifyResult(rv); printf("end copy test\n"); diff --git a/xpfe/appshell/src/nsAppShellService.cpp b/xpfe/appshell/src/nsAppShellService.cpp index 1f8dc01096ec..7dd3f95fc655 100644 --- a/xpfe/appshell/src/nsAppShellService.cpp +++ b/xpfe/appshell/src/nsAppShellService.cpp @@ -1210,7 +1210,7 @@ nsAppShellService::LaunchTask(const char *aParam, PRInt32 height, PRInt32 width, } else { - rv = OpenWindow(chromeUrlForTask, nsString(), width, height); + rv = OpenWindow(chromeUrlForTask, EmptyString(), width, height); } // If we get here without an error, then a window was opened OK. diff --git a/xpfe/components/search/src/nsInternetSearchService.cpp b/xpfe/components/search/src/nsInternetSearchService.cpp index f3e4b0188bb3..621075515b0d 100755 --- a/xpfe/components/search/src/nsInternetSearchService.cpp +++ b/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, nsAutoString(), inputUnused, 0, 0, 0))) return(rv); + if (NS_FAILED(rv = GetInputs(dataUni, userVar, EmptyString(), 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, nsAutoString()); + DoSearch(nsnull, engine, searchURL, EmptyString()); *searchInProgress = PR_TRUE; } @@ -3206,7 +3206,7 @@ InternetSearchDataSource::BeginSearchRequest(nsIRDFResource *source, PRBool doNe if (doNetworkRequest) { - DoSearch(source, engine, nsAutoString(), text); + DoSearch(source, engine, EmptyString(), text); requestInitiated = PR_TRUE; } } diff --git a/xpinstall/src/nsInstall.cpp b/xpinstall/src/nsInstall.cpp index 35fba3254d0c..e95fb6c09d5b 100644 --- a/xpinstall/src/nsInstall.cpp +++ b/xpinstall/src/nsInstall.cpp @@ -547,7 +547,7 @@ nsInstall::AddDirectory(const nsString& aRegName, PRInt32* aReturn) { return AddDirectory(aRegName, - nsAutoString(), + EmptyString(), aJarSource, aFolder, aSubdir, @@ -565,11 +565,11 @@ nsInstall::AddDirectory(const nsString& aJarSource, return NS_OK; } - return AddDirectory(nsAutoString(), - nsAutoString(), + return AddDirectory(EmptyString(), + EmptyString(), aJarSource, mPackageFolder, - nsAutoString(), + EmptyString(), INSTALL_NO_COMPARE, aReturn); } @@ -740,11 +740,11 @@ nsInstall::AddSubcomponent(const nsString& aJarSource, return NS_OK; } - return AddSubcomponent(nsAutoString(), + return AddSubcomponent(EmptyString(), version, aJarSource, mPackageFolder, - nsAutoString(), + EmptyString(), 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, nsAutoString(), aNewFolder); + return GetComponentFolder(aComponentName, EmptyString(), 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, nsAutoString(), aNewFolder); + return GetFolder(targetFolder, EmptyString(), 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, nsAutoString(), aJarSource, aFolder, aTargetName, aReturn); + return Patch(aRegName, EmptyString(), aJarSource, aFolder, aTargetName, aReturn); } PRInt32 @@ -1415,7 +1415,7 @@ nsInstall::SetPackageFolder(nsInstallFolder& aFolder) { return OUT_OF_MEMORY; } - nsresult res = folder->Init(aFolder, nsAutoString()); + nsresult res = folder->Init(aFolder, EmptyString()); 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, nsString()) )) + if (NS_FAILED( mPackageFolder->Init(packageDir, EmptyString()) )) { delete mPackageFolder; mPackageFolder = nsnull; @@ -1635,7 +1635,7 @@ nsInstall::FileOpDirGetParent(nsInstallFolder& aTarget, nsInstallFolder** thePar { return NS_ERROR_OUT_OF_MEMORY; } - folder->Init(parent,nsString()); + folder->Init(parent,EmptyString()); *theParentFolder = folder; } else diff --git a/xpinstall/src/nsJSInstall.cpp b/xpinstall/src/nsJSInstall.cpp index ee7d5f2cd245..8dcd4d75fbaf 100644 --- a/xpinstall/src/nsJSInstall.cpp +++ b/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(),nsString()); + folder->Init(a->GetJarFileLocation(),EmptyString()); JSObject* fileSpecObject = JS_NewObject(cx, &FileSpecObjectClass, gFileSpecProto, NULL);