Backing out to attempt to fix Mac orange. Bug 232691

This commit is contained in:
bzbarsky%mit.edu 2004-05-22 19:26:52 +00:00
Родитель f1a96e591e
Коммит 62f7fc6ea3
56 изменённых файлов: 97 добавлений и 97 удалений

Просмотреть файл

@ -459,7 +459,7 @@ NS_IMETHODIMP nsHTMLGroupboxAccessible::GetName(nsAString& _retval)
legends->Item(0, getter_AddRefs(legendNode));
nsCOMPtr<nsIContent> 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);
}
}

Просмотреть файл

@ -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<nsIContent> 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<nsIDOMElement> element(do_QueryInterface(mDOMNode));
if (element) {

Просмотреть файл

@ -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<nsIDOMElement> element(do_QueryInterface(mDOMNode));
if (element) {

Просмотреть файл

@ -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;
}

Просмотреть файл

@ -257,7 +257,7 @@ mozSanitizingHTMLSerializer::AppendElementStart(nsIDOMElement *aElement,
rv = DoOpenContainer(id);
}
else {
rv = DoAddLeaf(id, EmptyString());
rv = DoAddLeaf(id, nsString());
}
mContent = 0;

Просмотреть файл

@ -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);
}

Просмотреть файл

@ -170,7 +170,7 @@ nsHTMLContentSerializer::AppendText(nsIDOMText* aText,
nsresult rv;
nsCOMPtr<nsILineBreakerFactory> 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);
}
}

Просмотреть файл

@ -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);

Просмотреть файл

@ -1201,7 +1201,7 @@ nsHTMLInputElement::SelectAll(nsIPresContext* aPresContext)
if (formControlFrame) {
formControlFrame->SetProperty(aPresContext, nsHTMLAtoms::select,
EmptyString());
nsAutoString());
}
}

Просмотреть файл

@ -329,7 +329,7 @@ nsHTMLTextAreaElement::SelectAll(nsIPresContext* aPresContext)
if (formControlFrame) {
formControlFrame->SetProperty(aPresContext, nsHTMLAtoms::select,
EmptyString());
nsString());
}
return NS_OK;

Просмотреть файл

@ -2380,7 +2380,7 @@ nsHTMLDocument::ScriptWriteCommon(PRBool aNewlineTerminate)
}
// No arguments...
return WriteCommon(EmptyString(), aNewlineTerminate);
return WriteCommon(nsString(), aNewlineTerminate);
}
NS_IMETHODIMP

Просмотреть файл

@ -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,

Просмотреть файл

@ -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) {

Просмотреть файл

@ -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,

Просмотреть файл

@ -4303,7 +4303,7 @@ nsHTMLEditRules::CreateStyleForInsertText(nsISelection *aSelection, nsIDOMDocume
}
nsCOMPtr<nsIDOMNode> newNode;
nsCOMPtr<nsIDOMText> 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);

Просмотреть файл

@ -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<nsIDOMElement> 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<nsIDOMElement> 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);

Просмотреть файл

@ -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

Просмотреть файл

@ -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

Просмотреть файл

@ -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<nsILocalFileMac> localDirMac(do_QueryInterface(localDir));
rv = localDirMac->InitWithFSRef(&fsRef);

Просмотреть файл

@ -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";

Просмотреть файл

@ -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();

Просмотреть файл

@ -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();

Просмотреть файл

@ -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;

Просмотреть файл

@ -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;

Просмотреть файл

@ -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())

Просмотреть файл

@ -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)
{
};
};

Просмотреть файл

@ -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);
}

Просмотреть файл

@ -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);

Просмотреть файл

@ -66,7 +66,7 @@ txMozillaTextOutput::txMozillaTextOutput(nsIDOMDocumentFragment* aDest)
aDest->GetOwnerDocument(getter_AddRefs(doc));
NS_ASSERTION(doc, "unable to get ownerdocument");
nsCOMPtr<nsIDOMText> 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<nsIDOMNSDocument> 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<nsIDOMText> textNode;
mDocument->CreateTextNode(EmptyString(),
mDocument->CreateTextNode(nsString(),
getter_AddRefs(textNode));
NS_ASSERTION(textNode, "Failed to create the text node");
if (!textNode) {

Просмотреть файл

@ -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<nsIDOMNSDocument> domDoc = do_QueryInterface(mDocument);
if (domDoc) {
domDoc->SetTitle(EmptyString());
domDoc->SetTitle(nsString());
}
}

Просмотреть файл

@ -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;

Просмотреть файл

@ -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;

Просмотреть файл

@ -121,7 +121,7 @@ mozLineTerm::mozLineTerm() :
mSuspended(PR_FALSE),
mEchoFlag(PR_TRUE),
mObserver(nsnull),
mCookie(EmptyString()),
mCookie(nsAutoString()),
mLastTime(LL_ZERO)
{
mLTerm = lterm_new();

Просмотреть файл

@ -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),

Просмотреть файл

@ -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);

Просмотреть файл

@ -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);

Просмотреть файл

@ -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,

Просмотреть файл

@ -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;

Просмотреть файл

@ -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))
{

Просмотреть файл

@ -178,7 +178,7 @@ nsresult RecursiveCopy(nsIFile* srcDir, nsIFile* destDir)
}
}
else
rv = dirEntry->CopyTo(destDir, EmptyString());
rv = dirEntry->CopyTo(destDir, nsString());
}
}

Просмотреть файл

@ -278,7 +278,7 @@ LocateSpoolFile(nsACString & spoolPath)
nsresult rv;
nsCOMPtr<nsILocalFile> 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");

Просмотреть файл

@ -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;

Просмотреть файл

@ -313,7 +313,7 @@ NS_IMETHODIMP nsPrefBranch::GetComplexValue(const char *aPrefName, const nsIID &
return rv;
nsCOMPtr<nsILocalFile> 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));

Просмотреть файл

@ -211,7 +211,7 @@ nsJVMAuthTools::SetAuthenticationInfo(const char* protocol,
schemeString,
realmString,
EmptyCString(),
EmptyString(),
nsString(),
NS_ConvertUTF8toUCS2(username),
NS_ConvertUTF8toUCS2(password));
return rv;

Просмотреть файл

@ -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);

2
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

Просмотреть файл

@ -217,7 +217,7 @@ nsresult RecursiveCopy(nsIFile* srcDir, nsIFile* destDir)
}
}
else
rv = dirEntry->CopyToNative(destDir, EmptyCString());
rv = dirEntry->CopyToNative(destDir, nsCString());
}
}

Просмотреть файл

@ -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<nsILocalFileMac> 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

Просмотреть файл

@ -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;

Просмотреть файл

@ -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;

Просмотреть файл

@ -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<nsILocalFile> 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;

Просмотреть файл

@ -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");

Просмотреть файл

@ -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.

Просмотреть файл

@ -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;
}
}

Просмотреть файл

@ -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

Просмотреть файл

@ -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);