From 9e8f6009268dfe32bf730cc3e15387c36981b7c0 Mon Sep 17 00:00:00 2001 From: "jaggernaut%netscape.com" Date: Sat, 27 Oct 2001 06:44:19 +0000 Subject: [PATCH] Bug 53057: Fixing up users of implicit |CharT*| conversion operators for nsCString to use |.get()| instead, rr=dbaron, rs=scc git-svn-id: svn://10.0.0.236/trunk@106460 18797224-902f-48f8-a5cc-f745e15eee43 --- .../content/base/src/nsDocumentEncoder.cpp | 2 +- mozilla/content/base/src/nsSelection.cpp | 7 ++---- .../html/document/src/nsHTMLContentSink.cpp | 4 ++-- .../html/style/src/nsCSSDeclaration.cpp | 10 ++++---- .../content/html/style/src/nsCSSStruct.cpp | 10 ++++---- .../html/style/src/nsComputedDOMStyle.cpp | 24 +++++++++---------- mozilla/content/shared/src/nsHTMLUtils.cpp | 2 +- mozilla/content/xbl/src/nsBindingManager.cpp | 2 +- mozilla/content/xbl/src/nsXBLBinding.cpp | 6 ++--- .../content/xbl/src/nsXBLPrototypeBinding.cpp | 2 +- mozilla/content/xbl/src/nsXBLService.cpp | 8 +++---- .../content/xml/content/src/nsXMLElement.cpp | 8 +++---- .../src/nsControllerCommandManager.cpp | 10 ++++---- .../content/xul/document/src/nsElementMap.cpp | 12 +++++----- .../document/src/nsXULCommandDispatcher.cpp | 18 +++++++------- .../xul/document/src/nsXULContentSink.cpp | 22 ++++++++--------- .../xul/document/src/nsXULDocument.cpp | 23 +++++++++--------- .../xul/templates/src/nsXULContentBuilder.cpp | 12 +++++----- .../xul/templates/src/nsXULContentUtils.cpp | 2 +- .../templates/src/nsXULTemplateBuilder.cpp | 10 ++++---- mozilla/layout/generic/nsSelection.cpp | 7 ++---- mozilla/layout/style/nsCSSDeclaration.cpp | 10 ++++---- mozilla/layout/style/nsCSSStruct.cpp | 10 ++++---- mozilla/layout/style/nsComputedDOMStyle.cpp | 24 +++++++++---------- 24 files changed, 119 insertions(+), 126 deletions(-) diff --git a/mozilla/content/base/src/nsDocumentEncoder.cpp b/mozilla/content/base/src/nsDocumentEncoder.cpp index 4ba5f159a96..1af7acbeab3 100644 --- a/mozilla/content/base/src/nsDocumentEncoder.cpp +++ b/mozilla/content/base/src/nsDocumentEncoder.cpp @@ -886,7 +886,7 @@ nsDocumentEncoder::EncodeToString(nsAWritableString& aOutputString) nsCAutoString progId(NS_CONTENTSERIALIZER_CONTRACTID_PREFIX); progId.AppendWithConversion(mMimeType); - mSerializer = do_CreateInstance(NS_STATIC_CAST(const char *, progId)); + mSerializer = do_CreateInstance(progId.get()); NS_ENSURE_TRUE(mSerializer, NS_ERROR_NOT_IMPLEMENTED); nsresult rv = NS_OK; diff --git a/mozilla/content/base/src/nsSelection.cpp b/mozilla/content/base/src/nsSelection.cpp index 7b624a24db2..6984aa8b93e 100644 --- a/mozilla/content/base/src/nsSelection.cpp +++ b/mozilla/content/base/src/nsSelection.cpp @@ -1732,13 +1732,10 @@ nsTypedSelection::ToStringWithFormat(const char * aFormatType, PRUint32 aFlags, if (!aReturn) return NS_ERROR_NULL_POINTER; - nsCOMPtr encoder; nsCAutoString formatType( NS_DOC_ENCODER_CONTRACTID_BASE ); formatType.Append(aFormatType); - rv = nsComponentManager::CreateInstance(formatType, - nsnull, - NS_GET_IID(nsIDocumentEncoder), - getter_AddRefs(encoder)); + nsCOMPtr encoder = + do_CreateInstance(formatType.get(), &rv); NS_ENSURE_SUCCESS(rv, rv); nsCOMPtr shell; diff --git a/mozilla/content/html/document/src/nsHTMLContentSink.cpp b/mozilla/content/html/document/src/nsHTMLContentSink.cpp index c359e61b7b5..26b98c43235 100644 --- a/mozilla/content/html/document/src/nsHTMLContentSink.cpp +++ b/mozilla/content/html/document/src/nsHTMLContentSink.cpp @@ -3994,13 +3994,13 @@ nsresult CharsetConvRef(const nsString& aDocCharset, const nsCString& aRefInDocC { PRInt32 srcLen = aRefInDocCharset.Length(); PRInt32 dstLen; - rv = decoder->GetMaxLength(aRefInDocCharset, srcLen, &dstLen); + rv = decoder->GetMaxLength(aRefInDocCharset.get(), srcLen, &dstLen); if (NS_SUCCEEDED(rv)) { PRUnichar *ustr = (PRUnichar *) nsMemory::Alloc((dstLen+1) * sizeof(PRUnichar)); if (ustr) { - rv = decoder->Convert(aRefInDocCharset, &srcLen, ustr, &dstLen); + rv = decoder->Convert(aRefInDocCharset.get(), &srcLen, ustr, &dstLen); if (NS_SUCCEEDED(rv)) { ustr[dstLen] = 0; diff --git a/mozilla/content/html/style/src/nsCSSDeclaration.cpp b/mozilla/content/html/style/src/nsCSSDeclaration.cpp index 529951aa3b5..c922a051e94 100644 --- a/mozilla/content/html/style/src/nsCSSDeclaration.cpp +++ b/mozilla/content/html/style/src/nsCSSDeclaration.cpp @@ -315,7 +315,7 @@ void nsCSSRect::List(FILE* out, nsCSSProperty aPropID, PRInt32 aIndent) const nsAutoString buffer; if (eCSSProperty_UNKNOWN < aPropID) { - buffer.AppendWithConversion(nsCSSProps::GetStringValue(aPropID)); + buffer.AppendWithConversion(nsCSSProps::GetStringValue(aPropID).get()); buffer.AppendWithConversion(": "); } @@ -333,22 +333,22 @@ void nsCSSRect::List(FILE* out, PRInt32 aIndent, const nsCSSProperty aTRBL[]) co nsAutoString buffer; if (eCSSUnit_Null != mTop.GetUnit()) { - buffer.AppendWithConversion(nsCSSProps::GetStringValue(aTRBL[0])); + buffer.AppendWithConversion(nsCSSProps::GetStringValue(aTRBL[0]).get()); buffer.AppendWithConversion(": "); mTop.AppendToString(buffer); } if (eCSSUnit_Null != mRight.GetUnit()) { - buffer.AppendWithConversion(nsCSSProps::GetStringValue(aTRBL[1])); + buffer.AppendWithConversion(nsCSSProps::GetStringValue(aTRBL[1]).get()); buffer.AppendWithConversion(": "); mRight.AppendToString(buffer); } if (eCSSUnit_Null != mBottom.GetUnit()) { - buffer.AppendWithConversion(nsCSSProps::GetStringValue(aTRBL[2])); + buffer.AppendWithConversion(nsCSSProps::GetStringValue(aTRBL[2]).get()); buffer.AppendWithConversion(": "); mBottom.AppendToString(buffer); } if (eCSSUnit_Null != mLeft.GetUnit()) { - buffer.AppendWithConversion(nsCSSProps::GetStringValue(aTRBL[3])); + buffer.AppendWithConversion(nsCSSProps::GetStringValue(aTRBL[3]).get()); buffer.AppendWithConversion(": "); mLeft.AppendToString(buffer); } diff --git a/mozilla/content/html/style/src/nsCSSStruct.cpp b/mozilla/content/html/style/src/nsCSSStruct.cpp index 529951aa3b5..c922a051e94 100644 --- a/mozilla/content/html/style/src/nsCSSStruct.cpp +++ b/mozilla/content/html/style/src/nsCSSStruct.cpp @@ -315,7 +315,7 @@ void nsCSSRect::List(FILE* out, nsCSSProperty aPropID, PRInt32 aIndent) const nsAutoString buffer; if (eCSSProperty_UNKNOWN < aPropID) { - buffer.AppendWithConversion(nsCSSProps::GetStringValue(aPropID)); + buffer.AppendWithConversion(nsCSSProps::GetStringValue(aPropID).get()); buffer.AppendWithConversion(": "); } @@ -333,22 +333,22 @@ void nsCSSRect::List(FILE* out, PRInt32 aIndent, const nsCSSProperty aTRBL[]) co nsAutoString buffer; if (eCSSUnit_Null != mTop.GetUnit()) { - buffer.AppendWithConversion(nsCSSProps::GetStringValue(aTRBL[0])); + buffer.AppendWithConversion(nsCSSProps::GetStringValue(aTRBL[0]).get()); buffer.AppendWithConversion(": "); mTop.AppendToString(buffer); } if (eCSSUnit_Null != mRight.GetUnit()) { - buffer.AppendWithConversion(nsCSSProps::GetStringValue(aTRBL[1])); + buffer.AppendWithConversion(nsCSSProps::GetStringValue(aTRBL[1]).get()); buffer.AppendWithConversion(": "); mRight.AppendToString(buffer); } if (eCSSUnit_Null != mBottom.GetUnit()) { - buffer.AppendWithConversion(nsCSSProps::GetStringValue(aTRBL[2])); + buffer.AppendWithConversion(nsCSSProps::GetStringValue(aTRBL[2]).get()); buffer.AppendWithConversion(": "); mBottom.AppendToString(buffer); } if (eCSSUnit_Null != mLeft.GetUnit()) { - buffer.AppendWithConversion(nsCSSProps::GetStringValue(aTRBL[3])); + buffer.AppendWithConversion(nsCSSProps::GetStringValue(aTRBL[3]).get()); buffer.AppendWithConversion(": "); mLeft.AppendToString(buffer); } diff --git a/mozilla/content/html/style/src/nsComputedDOMStyle.cpp b/mozilla/content/html/style/src/nsComputedDOMStyle.cpp index da8e5899363..aad4a013518 100644 --- a/mozilla/content/html/style/src/nsComputedDOMStyle.cpp +++ b/mozilla/content/html/style/src/nsComputedDOMStyle.cpp @@ -681,7 +681,7 @@ nsComputedDOMStyle::GetCssFloat(nsIFrame *aFrame, const nsCString& cssFloat = nsCSSProps::SearchKeywordTable(display->mFloats, nsCSSProps::kFloatKTable); - val->SetString(cssFloat); + val->SetString(cssFloat.get()); } else { val->SetString(""); @@ -950,7 +950,7 @@ nsComputedDOMStyle::GetFontStyle(nsIFrame *aFrame, const nsCString& style= nsCSSProps::SearchKeywordTable(font->mFont.style, nsCSSProps::kFontStyleKTable); - val->SetString(style); + val->SetString(style.get()); } else { val->SetString(""); @@ -975,7 +975,7 @@ nsComputedDOMStyle::GetFontWeight(nsIFrame *aFrame, nsCSSProps::SearchKeywordTable(font->mFont.weight, nsCSSProps::kFontWeightKTable); if(str_weight.Length()>0) { - val->SetString(str_weight); + val->SetString(str_weight.get()); } else { nsAutoString num_weight; @@ -1005,7 +1005,7 @@ nsComputedDOMStyle::GetFontVariant(nsIFrame *aFrame, const nsCString& variant= nsCSSProps::SearchKeywordTable(font->mFont.variant, nsCSSProps::kFontVariantKTable); - val->SetString(variant); + val->SetString(variant.get()); } else { val->SetString(""); @@ -1031,7 +1031,7 @@ nsComputedDOMStyle::GetBackgroundColor(nsIFrame *aFrame, const nsCString& backgroundColor = nsCSSProps::SearchKeywordTable(NS_STYLE_BG_COLOR_TRANSPARENT, nsCSSProps::kBackgroundColorKTable); - val->SetString(backgroundColor); + val->SetString(backgroundColor.get()); } else { nsAutoString hex; @@ -1118,7 +1118,7 @@ nsComputedDOMStyle::GetBorderCollapse(nsIFrame *aFrame, const nsCString& ident= nsCSSProps::SearchKeywordTable(table->mBorderCollapse, nsCSSProps::kBorderCollapseKTable); - val->SetString(ident); + val->SetString(ident.get()); } else { val->SetString(""); @@ -1324,7 +1324,7 @@ nsComputedDOMStyle::GetOutlineStyle(nsIFrame *aFrame, const nsCString& style= nsCSSProps::SearchKeywordTable(outline->GetOutlineStyle(), nsCSSProps::kBorderStyleKTable); - val->SetString(style); + val->SetString(style.get()); } else { val->SetString(""); @@ -1425,7 +1425,7 @@ nsComputedDOMStyle::GetTextAlign(nsIFrame *aFrame, const nsCString& align= nsCSSProps::SearchKeywordTable(text->mTextAlign, nsCSSProps::kTextAlignKTable); - val->SetString(align); + val->SetString(align.get()); } else { val->SetString("start"); @@ -1449,7 +1449,7 @@ nsComputedDOMStyle::GetTextDecoration(nsIFrame *aFrame, const nsCString& decoration= nsCSSProps::SearchKeywordTable(text->mTextDecoration, nsCSSProps::kTextDecorationKTable); - val->SetString(decoration); + val->SetString(decoration.get()); } else { val->SetString(""); @@ -1473,7 +1473,7 @@ nsComputedDOMStyle::GetVisibility(nsIFrame *aFrame, const nsCString& value= nsCSSProps::SearchKeywordTable(visibility->mVisible, nsCSSProps::kVisibilityKTable); - val->SetString(value); + val->SetString(value.get()); } else { val->SetString(""); @@ -2352,7 +2352,7 @@ nsComputedDOMStyle::GetBorderWidthFor(PRUint8 aSide, const nsCString& width= nsCSSProps::SearchKeywordTable(coord.GetIntValue(), nsCSSProps::kBorderWidthKTable); - val->SetString(width); break; + val->SetString(width.get()); break; } default: NS_WARNING("double check the unit"); @@ -2465,7 +2465,7 @@ nsComputedDOMStyle::GetBorderStyleFor(PRUint8 aSide, const nsCString& style= nsCSSProps::SearchKeywordTable(border->GetBorderStyle(aSide), nsCSSProps::kBorderStyleKTable); - val->SetString(style); + val->SetString(style.get()); } else { val->SetString(""); diff --git a/mozilla/content/shared/src/nsHTMLUtils.cpp b/mozilla/content/shared/src/nsHTMLUtils.cpp index 11c1213a8af..ee6f3ad865a 100644 --- a/mozilla/content/shared/src/nsHTMLUtils.cpp +++ b/mozilla/content/shared/src/nsHTMLUtils.cpp @@ -193,7 +193,7 @@ NS_MakeAbsoluteURIWithCharset(char* *aResult, } } - return aBaseURI->Resolve(spec, aResult); + return aBaseURI->Resolve(spec.get(), aResult); } diff --git a/mozilla/content/xbl/src/nsBindingManager.cpp b/mozilla/content/xbl/src/nsBindingManager.cpp index ae5f8140b93..8ef786b52b9 100644 --- a/mozilla/content/xbl/src/nsBindingManager.cpp +++ b/mozilla/content/xbl/src/nsBindingManager.cpp @@ -1231,7 +1231,7 @@ nsBindingManager::LoadBindingDocument(nsIDocument* aBoundDoc, const nsAReadableS nsXPIDLCString otherScheme; nsCOMPtr ioService = do_GetService(NS_IOSERVICE_CONTRACTID); if (!ioService) return NS_ERROR_FAILURE; - ioService->ExtractScheme(url, 0, 0, getter_Copies(otherScheme)); + ioService->ExtractScheme(url.get(), 0, 0, getter_Copies(otherScheme)); nsCOMPtr docURL; aBoundDoc->GetDocumentURL(getter_AddRefs(docURL)); diff --git a/mozilla/content/xbl/src/nsXBLBinding.cpp b/mozilla/content/xbl/src/nsXBLBinding.cpp index 100c2e76993..cf05d47a0a9 100644 --- a/mozilla/content/xbl/src/nsXBLBinding.cpp +++ b/mozilla/content/xbl/src/nsXBLBinding.cpp @@ -573,7 +573,7 @@ PRBool PR_CALLBACK BuildContentLists(nsHashKey* aKey, void* aData, void* aClosur } if (!pseudoPoint) { - NS_NewXBLInsertionPoint(parent, -1, nsnull, getter_AddRefs(pseudoPoint)); + NS_NewXBLInsertionPoint(parent.get(), -1, nsnull, getter_AddRefs(pseudoPoint)); contentList->AppendElement(pseudoPoint); } @@ -711,7 +711,7 @@ nsXBLBinding::GenerateAnonymousContent() mPrototypeBinding->GetDocURI(uri); message += uri; message += " is still using the deprecated\n syntax! Use instead!\n"; - NS_WARNING(message); + NS_WARNING(message.get()); } #endif @@ -1374,7 +1374,7 @@ nsXBLBinding::InitClass(const nsCString& aClassName, nsIScriptContext* aContext, jsval vp; JSObject* proto; - if ((! ::JS_LookupProperty(jscontext, global, aClassName, &vp)) || + if ((! ::JS_LookupProperty(jscontext, global, aClassName.get(), &vp)) || JSVAL_IS_PRIMITIVE(vp)) { // We need to initialize the class. diff --git a/mozilla/content/xbl/src/nsXBLPrototypeBinding.cpp b/mozilla/content/xbl/src/nsXBLPrototypeBinding.cpp index 0c6886c25b0..bc95c36b40b 100644 --- a/mozilla/content/xbl/src/nsXBLPrototypeBinding.cpp +++ b/mozilla/content/xbl/src/nsXBLPrototypeBinding.cpp @@ -1018,7 +1018,7 @@ nsXBLPrototypeBinding::InitClass(const nsCString& aClassName, nsIScriptContext * jsval vp; JSObject* proto; - if ((! ::JS_LookupProperty(jscontext, global, aClassName, &vp)) || JSVAL_IS_PRIMITIVE(vp)) { + if ((! ::JS_LookupProperty(jscontext, global, aClassName.get(), &vp)) || JSVAL_IS_PRIMITIVE(vp)) { // We need to initialize the class. nsXBLJSClass* c; void* classObject; diff --git a/mozilla/content/xbl/src/nsXBLService.cpp b/mozilla/content/xbl/src/nsXBLService.cpp index 11f7089c1cf..24cca6b8ea9 100644 --- a/mozilla/content/xbl/src/nsXBLService.cpp +++ b/mozilla/content/xbl/src/nsXBLService.cpp @@ -692,7 +692,7 @@ nsXBLService::LoadBindings(nsIContent* aContent, const nsAReadableString& aURL, if (!newBinding) { nsCAutoString str( "Failed to locate XBL binding. XBL is now using id instead of name to reference bindings. Make sure you have switched over. The invalid binding name is: "); str.AppendWithConversion(aURL); - NS_ERROR(str); + NS_ERROR(str.get()); return NS_OK; } @@ -986,7 +986,7 @@ NS_IMETHODIMP nsXBLService::GetBindingInternal(nsIContent* aBoundElement, if (!root) return NS_ERROR_FAILURE; - nsAutoString bindingName; bindingName.AssignWithConversion( NS_STATIC_CAST(const char*, ref) ); + nsAutoString bindingName; bindingName.AssignWithConversion( ref.get() ); PRInt32 count; root->ChildCount(count); @@ -1106,7 +1106,7 @@ NS_IMETHODIMP nsXBLService::GetBindingInternal(nsIContent* aBoundElement, nsCOMPtr docURI; doc->GetDocumentURL(getter_AddRefs(docURI)); nsXPIDLCString urlStr; - docURI->Resolve(urlCString, getter_Copies(urlStr)); + docURI->Resolve(urlCString.get(), getter_Copies(urlStr)); urlCString = urlStr.get(); if (NS_FAILED(GetBindingInternal(aBoundElement, urlCString, aPeekOnly, aIsReady, getter_AddRefs(baseBinding)))) return NS_ERROR_FAILURE; // Binding not yet ready or an error occurred. @@ -1191,7 +1191,7 @@ nsXBLService::LoadBindingDocumentInfo(nsIContent* aBoundElement, nsIDocument* aB // Finally, if all lines of defense fail, we go and fetch the binding // document. nsCOMPtr uri; - rv = NS_NewURI(getter_AddRefs(uri), aURLStr); + rv = NS_NewURI(getter_AddRefs(uri), aURLStr.get()); NS_ASSERTION(NS_SUCCEEDED(rv), "unable to create a url"); nsCOMPtr document; diff --git a/mozilla/content/xml/content/src/nsXMLElement.cpp b/mozilla/content/xml/content/src/nsXMLElement.cpp index 4643cf40f76..78760aa74ef 100644 --- a/mozilla/content/xml/content/src/nsXMLElement.cpp +++ b/mozilla/content/xml/content/src/nsXMLElement.cpp @@ -207,7 +207,7 @@ nsXMLElement::GetXMLBaseURI(nsIURI **aURI) // XXX URL escape? nsCAutoString str; str.AssignWithConversion(value); - rv = MakeURI(str,nsnull,aURI); + rv = MakeURI(str.get(),nsnull,aURI); if (NS_FAILED(rv)) break; @@ -215,7 +215,7 @@ nsXMLElement::GetXMLBaseURI(nsIURI **aURI) // XXX URL escape? str.AssignWithConversion(base.get()); nsXPIDLCString resolvedStr; - rv = (*aURI)->Resolve(str, getter_Copies(resolvedStr)); + rv = (*aURI)->Resolve(str.get(), getter_Copies(resolvedStr)); if (NS_FAILED(rv)) break; rv = (*aURI)->SetSpec(resolvedStr); } @@ -256,7 +256,7 @@ nsXMLElement::GetXMLBaseURI(nsIURI **aURI) } else { // XXX URL escape? nsCAutoString str; str.AssignWithConversion(base); - rv = MakeURI(str,docBase,aURI); + rv = MakeURI(str.get(),docBase,aURI); } } } else { @@ -327,7 +327,7 @@ static nsresult CheckLoadURI(nsIURI *aBaseURI, const nsAReadableString& aURI, *aAbsURI = nsnull; nsresult rv; - rv = MakeURI(str,aBaseURI,aAbsURI); + rv = MakeURI(str.get(),aBaseURI,aAbsURI); if (NS_SUCCEEDED(rv)) { nsCOMPtr securityManager = do_GetService(NS_SCRIPTSECURITYMANAGER_CONTRACTID, &rv); diff --git a/mozilla/content/xul/document/src/nsControllerCommandManager.cpp b/mozilla/content/xul/document/src/nsControllerCommandManager.cpp index 7419255dd67..461a04028db 100644 --- a/mozilla/content/xul/document/src/nsControllerCommandManager.cpp +++ b/mozilla/content/xul/document/src/nsControllerCommandManager.cpp @@ -73,7 +73,7 @@ nsControllerCommandManager::RegisterCommand(const nsAReadableString & aCommandNa #if DEBUG nsCAutoString msg("Replacing existing command -- "); msg.AppendWithConversion(aCommandName); - NS_WARNING(msg); + NS_WARNING(msg.get()); #endif } return NS_OK; @@ -123,7 +123,7 @@ nsControllerCommandManager::IsCommandEnabled(const nsAReadableString & aCommandN #if DEBUG nsCAutoString msg("Controller command manager asked about a command that it does not handle -- "); msg.AppendWithConversion(aCommandName); - NS_WARNING(msg); + NS_WARNING(msg.get()); #endif return NS_OK; // we don't handle this command } @@ -143,7 +143,7 @@ nsControllerCommandManager::UpdateCommandState(const nsAReadableString & aComman #if DEBUG nsCAutoString msg("Controller command manager asked to update the state of a command that it does not handle -- "); msg.AppendWithConversion(aCommandName); - NS_WARNING(msg); + NS_WARNING(msg.get()); #endif return NS_OK; // we don't handle this command } @@ -154,7 +154,7 @@ nsControllerCommandManager::UpdateCommandState(const nsAReadableString & aComman #if DEBUG nsCAutoString msg("Controller command manager asked to update the state of a command that doesn't do state updating -- "); msg.AppendWithConversion(aCommandName); - NS_WARNING(msg); + NS_WARNING(msg.get()); #endif return NS_ERROR_NO_INTERFACE; } @@ -191,7 +191,7 @@ nsControllerCommandManager::DoCommand(const nsAReadableString & aCommandName, ns #if DEBUG nsCAutoString msg("Controller command manager asked to do a command that it does not handle -- "); msg.AppendWithConversion(aCommandName); - NS_WARNING(msg); + NS_WARNING(msg.get()); #endif return NS_OK; // we don't handle this command } diff --git a/mozilla/content/xul/document/src/nsElementMap.cpp b/mozilla/content/xul/document/src/nsElementMap.cpp index 7afdf690cbd..14db42f4fe3 100644 --- a/mozilla/content/xul/document/src/nsElementMap.cpp +++ b/mozilla/content/xul/document/src/nsElementMap.cpp @@ -214,9 +214,9 @@ nsElementMap::Add(const nsAReadableString& aID, nsIContent* aContent) PR_LOG(gMapLog, PR_LOG_ALWAYS, ("xulelemap(%p) dup %s[%p] <-- %s\n", this, - (const char*) tagnameC, + tagnameC.get(), aContent, - (const char*) aidC)); + aidC.get())); } #endif @@ -251,9 +251,9 @@ nsElementMap::Add(const nsAReadableString& aID, nsIContent* aContent) PR_LOG(gMapLog, PR_LOG_ALWAYS, ("xulelemap(%p) add %s[%p] <-- %s\n", this, - (const char*) tagnameC, + tagnameC.get(), aContent, - (const char*)aidC)); + aidC.get())); } #endif @@ -289,9 +289,9 @@ nsElementMap::Remove(const nsAReadableString& aID, nsIContent* aContent) PR_LOG(gMapLog, PR_LOG_ALWAYS, ("xulelemap(%p) remove %s[%p] <-- %s\n", this, - (const char*) tagnameC, + tagnameC.get(), aContent, - (const char*) aidC)); + aidC.get())); } #endif diff --git a/mozilla/content/xul/document/src/nsXULCommandDispatcher.cpp b/mozilla/content/xul/document/src/nsXULCommandDispatcher.cpp index fee5cef62ab..2914a02439c 100644 --- a/mozilla/content/xul/document/src/nsXULCommandDispatcher.cpp +++ b/mozilla/content/xul/document/src/nsXULCommandDispatcher.cpp @@ -230,10 +230,10 @@ nsXULCommandDispatcher::AddCommandUpdater(nsIDOMElement* aElement, PR_LOG(gLog, PR_LOG_ALWAYS, ("xulcmd[%p] replace %p(events=%s targets=%s) with (events=%s targets=%s)", this, aElement, - (const char*) eventsC, - (const char*) targetsC, - (const char*) aeventsC, - (const char*) atargetsC)); + eventsC.get(), + targetsC.get(), + aeventsC.get(), + atargetsC.get())); #endif // If the updater was already in the list, then replace @@ -255,8 +255,8 @@ nsXULCommandDispatcher::AddCommandUpdater(nsIDOMElement* aElement, PR_LOG(gLog, PR_LOG_ALWAYS, ("xulcmd[%p] add %p(events=%s targets=%s)", this, aElement, - (const char*) aeventsC, - (const char*) atargetsC)); + aeventsC.get(), + atargetsC.get())); #endif // If we get here, this is a new updater. Append it to the list. @@ -287,8 +287,8 @@ nsXULCommandDispatcher::RemoveCommandUpdater(nsIDOMElement* aElement) PR_LOG(gLog, PR_LOG_ALWAYS, ("xulcmd[%p] remove %p(events=%s targets=%s)", this, aElement, - (const char*) eventsC, - (const char*) targetsC)); + eventsC.get(), + targetsC.get())); #endif *link = updater->mNext; @@ -357,7 +357,7 @@ nsXULCommandDispatcher::UpdateCommands(const nsAReadableString& aEventName) PR_LOG(gLog, PR_LOG_ALWAYS, ("xulcmd[%p] update %p event=%s", this, updater->mElement, - (const char*) aeventnameC)); + aeventnameC.get())); #endif PRInt32 count = document->GetNumberOfShells(); diff --git a/mozilla/content/xul/document/src/nsXULContentSink.cpp b/mozilla/content/xul/document/src/nsXULContentSink.cpp index 61c84051f27..ef2ecb86fa0 100644 --- a/mozilla/content/xul/document/src/nsXULContentSink.cpp +++ b/mozilla/content/xul/document/src/nsXULContentSink.cpp @@ -592,8 +592,8 @@ XULContentSinkImpl::OpenContainer(const nsIParserNode& aNode) PR_LOG(gLog, PR_LOG_DEBUG, ("xul: %.5d. %s<%s>", aNode.GetSourceLineNumber(), - NS_STATIC_CAST(const char*, extraWhiteSpace), - NS_STATIC_CAST(const char*, textC))); + extraWhiteSpace.get(), + textC.get())); } #endif @@ -617,7 +617,7 @@ XULContentSinkImpl::OpenContainer(const nsIParserNode& aNode) anodeC.AssignWithConversion(aNode.GetText()); PR_LOG(gLog, PR_LOG_ALWAYS, ("xul: unrecognized namespace on '%s' at line %d", - NS_STATIC_CAST(const char*,anodeC), + anodeC.get(), aNode.GetSourceLineNumber())); #endif @@ -670,8 +670,8 @@ XULContentSinkImpl::CloseContainer(const nsIParserNode& aNode) PR_LOG(gLog, PR_LOG_DEBUG, ("xul: %.5d. %s", aNode.GetSourceLineNumber(), - NS_STATIC_CAST(const char*, extraWhiteSpace), - NS_STATIC_CAST(const char*, textC))); + extraWhiteSpace.get(), + textC.get())); } #endif @@ -1244,7 +1244,7 @@ XULContentSinkImpl::AddAttributes(const nsIParserNode& aNode, nsXULPrototypeElem qnameC.AssignWithConversion(qname); PR_LOG(gLog, PR_LOG_ALWAYS, ("xul: unable to parse attribute '%s' at line %d", - (const char*) qnameC, aNode.GetSourceLineNumber())); + qnameC.get(), aNode.GetSourceLineNumber())); // Bring it. We'll just fail to copy an attribute that we // can't parse. And that's one less attribute to worry @@ -1270,9 +1270,9 @@ XULContentSinkImpl::AddAttributes(const nsIParserNode& aNode, nsXULPrototypeElem PR_LOG(gLog, PR_LOG_DEBUG, ("xul: %.5d. %s %s=%s", aNode.GetSourceLineNumber(), - NS_STATIC_CAST(const char*, extraWhiteSpace), - NS_STATIC_CAST(const char*, qnameC), - NS_STATIC_CAST(const char*, valueC))); + extraWhiteSpace.get(), + qnameC.get(), + valueC.get())); } #endif @@ -1433,7 +1433,7 @@ XULContentSinkImpl::OpenRoot(const nsIParserNode& aNode, nsINodeInfo *aNodeInfo) anodeC.AssignWithConversion(aNode.GetText()); PR_LOG(gLog, PR_LOG_ALWAYS, ("xul: unable to create element '%s' at line %d", - NS_STATIC_CAST(const char*, anodeC), + anodeC.get(), aNode.GetSourceLineNumber())); #endif @@ -1478,7 +1478,7 @@ XULContentSinkImpl::OpenTag(const nsIParserNode& aNode, nsINodeInfo *aNodeInfo) anodeC.AssignWithConversion(aNode.GetText()); PR_LOG(gLog, PR_LOG_ALWAYS, ("xul: unable to create element '%s' at line %d", - NS_STATIC_CAST(const char*, anodeC), + anodeC.get(), aNode.GetSourceLineNumber())); #endif diff --git a/mozilla/content/xul/document/src/nsXULDocument.cpp b/mozilla/content/xul/document/src/nsXULDocument.cpp index bdfc660a958..cab6fe792b8 100644 --- a/mozilla/content/xul/document/src/nsXULDocument.cpp +++ b/mozilla/content/xul/document/src/nsXULDocument.cpp @@ -2882,8 +2882,7 @@ nsXULDocument::Persist(nsIContent* aElement, PRInt32 aNameSpaceID, if (NS_FAILED(rv)) return rv; nsCOMPtr attr; - nsCAutoString temp_attrstr; temp_attrstr.AssignWithConversion(attrstr); - rv = gRDFService->GetResource(temp_attrstr, getter_AddRefs(attr)); + rv = gRDFService->GetResource(NS_LossyConvertUCS2toASCII(attrstr).get(), getter_AddRefs(attr)); if (NS_FAILED(rv)) return rv; // Turn the value into a literal @@ -6162,7 +6161,7 @@ nsXULDocument::CreateElement(nsXULPrototypeElement* aPrototype, nsIContent** aRe tagstrC.AssignWithConversion(tagstr); PR_LOG(gXULLog, PR_LOG_ALWAYS, ("xul: creating <%s> from prototype", - (const char*) tagstrC)); + tagstrC.get())); } #endif @@ -6443,7 +6442,7 @@ nsXULDocument::OverlayForwardReference::Resolve() idC.AssignWithConversion(id); PR_LOG(gXULLog, PR_LOG_ALWAYS, ("xul: overlay resolved '%s'", - (const char*) idC)); + idC.get())); mResolved = PR_TRUE; return eResolve_Succeeded; @@ -6611,7 +6610,7 @@ nsXULDocument::OverlayForwardReference::~OverlayForwardReference() idC.AssignWithConversion(id); PR_LOG(gXULLog, PR_LOG_ALWAYS, ("xul: overlay failed to resolve '%s'", - (const char*) idC)); + idC.get())); } #endif } @@ -6673,9 +6672,9 @@ nsXULDocument::BroadcasterHookup::~BroadcasterHookup() broadcasteridC.AssignWithConversion(broadcasterID); PR_LOG(gXULLog, PR_LOG_ALWAYS, ("xul: broadcaster hookup failed <%s attribute='%s'> to %s", - (const char*) tagstrC, - (const char*) attributeC, - (const char*) broadcasteridC)); + tagstrC.get(), + attributeC.get(), + broadcasteridC.get())); } #endif } @@ -6818,9 +6817,9 @@ nsXULDocument::CheckBroadcasterHookup(nsXULDocument* aDocument, broadcasteridC.AssignWithConversion(broadcasterID); PR_LOG(gXULLog, PR_LOG_ALWAYS, ("xul: broadcaster hookup <%s attribute='%s'> to %s", - (const char*) tagstrC, - (const char*) attributeC, - (const char*) broadcasteridC)); + tagstrC.get(), + attributeC.get(), + broadcasteridC.get())); } #endif @@ -6998,7 +6997,7 @@ nsXULDocument::GetBoxObjectFor(nsIDOMElement* aElement, nsIBoxObject** aResult) } contractID += ";1"; - nsCOMPtr boxObject(do_CreateInstance(contractID)); + nsCOMPtr boxObject(do_CreateInstance(contractID.get())); if (!boxObject) return NS_ERROR_FAILURE; diff --git a/mozilla/content/xul/templates/src/nsXULContentBuilder.cpp b/mozilla/content/xul/templates/src/nsXULContentBuilder.cpp index d684308d3ac..415bb031912 100644 --- a/mozilla/content/xul/templates/src/nsXULContentBuilder.cpp +++ b/mozilla/content/xul/templates/src/nsXULContentBuilder.cpp @@ -454,9 +454,9 @@ nsXULContentBuilder::BuildContentFromTemplate(nsIContent *aTemplateNode, PR_LOG(gXULTemplateLog, PR_LOG_DEBUG, ("xultemplate[%p] build-content-from-template %s (template='%s') [%s]", this, - (const char*) tagstrC, - (const char*) templatestrC, - (const char*) resourceCStr)); + tagstrC.get(), + templatestrC.get(), + resourceCStr.get())); } #endif @@ -555,7 +555,7 @@ nsXULContentBuilder::BuildContentFromTemplate(nsIContent *aTemplateNode, tagstrC.AssignWithConversion(tagname); PR_LOG(gXULTemplateLog, PR_LOG_DEBUG, ("xultemplate[%p] building %s %s %s", - this, (const char*) tagstrC, + this, tagstrC.get(), (isResourceElement ? "[resource]" : ""), (isUnique ? "[unique]" : ""))); } @@ -1148,8 +1148,8 @@ nsXULContentBuilder::RemoveMember(nsIContent* aContainerElement, PR_LOG(gXULTemplateLog, PR_LOG_ALWAYS, ("xultemplate[%p] remove-member %s->%s [%s]", this, - (const char*) parenttagstrC, - (const char*) childtagstrC, + parenttagstrC.get(), + childtagstrC.get(), resourceCStr)); } #endif diff --git a/mozilla/content/xul/templates/src/nsXULContentUtils.cpp b/mozilla/content/xul/templates/src/nsXULContentUtils.cpp index edf0f3cbc0b..3efdc68cbdc 100644 --- a/mozilla/content/xul/templates/src/nsXULContentUtils.cpp +++ b/mozilla/content/xul/templates/src/nsXULContentUtils.cpp @@ -413,7 +413,7 @@ nsXULContentUtils::MakeElementResource(nsIDocument* aDocument, const nsAReadable rv = MakeElementURI(aDocument, aID, uri); if (NS_FAILED(rv)) return rv; - rv = gRDF->GetResource(uri, aResult); + rv = gRDF->GetResource(uri.get(), aResult); NS_ASSERTION(NS_SUCCEEDED(rv), "unable to create resource"); if (NS_FAILED(rv)) return rv; diff --git a/mozilla/content/xul/templates/src/nsXULTemplateBuilder.cpp b/mozilla/content/xul/templates/src/nsXULTemplateBuilder.cpp index b45fc3f6dd4..139c6d6c888 100644 --- a/mozilla/content/xul/templates/src/nsXULTemplateBuilder.cpp +++ b/mozilla/content/xul/templates/src/nsXULTemplateBuilder.cpp @@ -879,7 +879,7 @@ nsXULTemplateBuilder::LoadDataSources() nsCAutoString uristrC; uristrC.AssignWithConversion(uriStr); - rv = gRDFService->GetDataSource(uristrC, getter_AddRefs(ds)); + rv = gRDFService->GetDataSource(uristrC.get(), getter_AddRefs(ds)); if (NS_FAILED(rv)) { // This is only a warning because the data source may not @@ -890,7 +890,7 @@ nsXULTemplateBuilder::LoadDataSources() msg.Append("unable to load datasource '"); msg.AppendWithConversion(uriStr); msg.Append('\''); - NS_WARNING((const char*) msg); + NS_WARNING(msg.get()); #endif continue; } @@ -1395,7 +1395,7 @@ nsXULTemplateBuilder::Log(const char* aOperation, PR_LOG(gXULTemplateLog, PR_LOG_DEBUG, (" --[%s]-->[%s]", propertyStr, - (const char*) targetstrC)); + targetstrC.get())); } return NS_OK; } @@ -1881,7 +1881,7 @@ nsXULTemplateBuilder::CompileCondition(nsIAtom* aTag, tagstrC.AssignWithConversion(tagstr); PR_LOG(gXULTemplateLog, PR_LOG_ALWAYS, ("xultemplate[%p] unrecognized condition test <%s>", - this, NS_STATIC_CAST(const char*, tagstrC))); + this, tagstrC.get())); #endif rv = NS_OK; @@ -2061,7 +2061,7 @@ nsXULTemplateBuilder::CompileBindings(nsTemplateRule* aRule, nsIContent* aBindin tagstrC.AssignWithConversion(tagstr); PR_LOG(gXULTemplateLog, PR_LOG_ALWAYS, ("xultemplate[%p] unrecognized binding <%s>", - this, NS_STATIC_CAST(const char*, tagstrC))); + this, tagstrC.get())); #endif continue; diff --git a/mozilla/layout/generic/nsSelection.cpp b/mozilla/layout/generic/nsSelection.cpp index 7b624a24db2..6984aa8b93e 100644 --- a/mozilla/layout/generic/nsSelection.cpp +++ b/mozilla/layout/generic/nsSelection.cpp @@ -1732,13 +1732,10 @@ nsTypedSelection::ToStringWithFormat(const char * aFormatType, PRUint32 aFlags, if (!aReturn) return NS_ERROR_NULL_POINTER; - nsCOMPtr encoder; nsCAutoString formatType( NS_DOC_ENCODER_CONTRACTID_BASE ); formatType.Append(aFormatType); - rv = nsComponentManager::CreateInstance(formatType, - nsnull, - NS_GET_IID(nsIDocumentEncoder), - getter_AddRefs(encoder)); + nsCOMPtr encoder = + do_CreateInstance(formatType.get(), &rv); NS_ENSURE_SUCCESS(rv, rv); nsCOMPtr shell; diff --git a/mozilla/layout/style/nsCSSDeclaration.cpp b/mozilla/layout/style/nsCSSDeclaration.cpp index 529951aa3b5..c922a051e94 100644 --- a/mozilla/layout/style/nsCSSDeclaration.cpp +++ b/mozilla/layout/style/nsCSSDeclaration.cpp @@ -315,7 +315,7 @@ void nsCSSRect::List(FILE* out, nsCSSProperty aPropID, PRInt32 aIndent) const nsAutoString buffer; if (eCSSProperty_UNKNOWN < aPropID) { - buffer.AppendWithConversion(nsCSSProps::GetStringValue(aPropID)); + buffer.AppendWithConversion(nsCSSProps::GetStringValue(aPropID).get()); buffer.AppendWithConversion(": "); } @@ -333,22 +333,22 @@ void nsCSSRect::List(FILE* out, PRInt32 aIndent, const nsCSSProperty aTRBL[]) co nsAutoString buffer; if (eCSSUnit_Null != mTop.GetUnit()) { - buffer.AppendWithConversion(nsCSSProps::GetStringValue(aTRBL[0])); + buffer.AppendWithConversion(nsCSSProps::GetStringValue(aTRBL[0]).get()); buffer.AppendWithConversion(": "); mTop.AppendToString(buffer); } if (eCSSUnit_Null != mRight.GetUnit()) { - buffer.AppendWithConversion(nsCSSProps::GetStringValue(aTRBL[1])); + buffer.AppendWithConversion(nsCSSProps::GetStringValue(aTRBL[1]).get()); buffer.AppendWithConversion(": "); mRight.AppendToString(buffer); } if (eCSSUnit_Null != mBottom.GetUnit()) { - buffer.AppendWithConversion(nsCSSProps::GetStringValue(aTRBL[2])); + buffer.AppendWithConversion(nsCSSProps::GetStringValue(aTRBL[2]).get()); buffer.AppendWithConversion(": "); mBottom.AppendToString(buffer); } if (eCSSUnit_Null != mLeft.GetUnit()) { - buffer.AppendWithConversion(nsCSSProps::GetStringValue(aTRBL[3])); + buffer.AppendWithConversion(nsCSSProps::GetStringValue(aTRBL[3]).get()); buffer.AppendWithConversion(": "); mLeft.AppendToString(buffer); } diff --git a/mozilla/layout/style/nsCSSStruct.cpp b/mozilla/layout/style/nsCSSStruct.cpp index 529951aa3b5..c922a051e94 100644 --- a/mozilla/layout/style/nsCSSStruct.cpp +++ b/mozilla/layout/style/nsCSSStruct.cpp @@ -315,7 +315,7 @@ void nsCSSRect::List(FILE* out, nsCSSProperty aPropID, PRInt32 aIndent) const nsAutoString buffer; if (eCSSProperty_UNKNOWN < aPropID) { - buffer.AppendWithConversion(nsCSSProps::GetStringValue(aPropID)); + buffer.AppendWithConversion(nsCSSProps::GetStringValue(aPropID).get()); buffer.AppendWithConversion(": "); } @@ -333,22 +333,22 @@ void nsCSSRect::List(FILE* out, PRInt32 aIndent, const nsCSSProperty aTRBL[]) co nsAutoString buffer; if (eCSSUnit_Null != mTop.GetUnit()) { - buffer.AppendWithConversion(nsCSSProps::GetStringValue(aTRBL[0])); + buffer.AppendWithConversion(nsCSSProps::GetStringValue(aTRBL[0]).get()); buffer.AppendWithConversion(": "); mTop.AppendToString(buffer); } if (eCSSUnit_Null != mRight.GetUnit()) { - buffer.AppendWithConversion(nsCSSProps::GetStringValue(aTRBL[1])); + buffer.AppendWithConversion(nsCSSProps::GetStringValue(aTRBL[1]).get()); buffer.AppendWithConversion(": "); mRight.AppendToString(buffer); } if (eCSSUnit_Null != mBottom.GetUnit()) { - buffer.AppendWithConversion(nsCSSProps::GetStringValue(aTRBL[2])); + buffer.AppendWithConversion(nsCSSProps::GetStringValue(aTRBL[2]).get()); buffer.AppendWithConversion(": "); mBottom.AppendToString(buffer); } if (eCSSUnit_Null != mLeft.GetUnit()) { - buffer.AppendWithConversion(nsCSSProps::GetStringValue(aTRBL[3])); + buffer.AppendWithConversion(nsCSSProps::GetStringValue(aTRBL[3]).get()); buffer.AppendWithConversion(": "); mLeft.AppendToString(buffer); } diff --git a/mozilla/layout/style/nsComputedDOMStyle.cpp b/mozilla/layout/style/nsComputedDOMStyle.cpp index da8e5899363..aad4a013518 100644 --- a/mozilla/layout/style/nsComputedDOMStyle.cpp +++ b/mozilla/layout/style/nsComputedDOMStyle.cpp @@ -681,7 +681,7 @@ nsComputedDOMStyle::GetCssFloat(nsIFrame *aFrame, const nsCString& cssFloat = nsCSSProps::SearchKeywordTable(display->mFloats, nsCSSProps::kFloatKTable); - val->SetString(cssFloat); + val->SetString(cssFloat.get()); } else { val->SetString(""); @@ -950,7 +950,7 @@ nsComputedDOMStyle::GetFontStyle(nsIFrame *aFrame, const nsCString& style= nsCSSProps::SearchKeywordTable(font->mFont.style, nsCSSProps::kFontStyleKTable); - val->SetString(style); + val->SetString(style.get()); } else { val->SetString(""); @@ -975,7 +975,7 @@ nsComputedDOMStyle::GetFontWeight(nsIFrame *aFrame, nsCSSProps::SearchKeywordTable(font->mFont.weight, nsCSSProps::kFontWeightKTable); if(str_weight.Length()>0) { - val->SetString(str_weight); + val->SetString(str_weight.get()); } else { nsAutoString num_weight; @@ -1005,7 +1005,7 @@ nsComputedDOMStyle::GetFontVariant(nsIFrame *aFrame, const nsCString& variant= nsCSSProps::SearchKeywordTable(font->mFont.variant, nsCSSProps::kFontVariantKTable); - val->SetString(variant); + val->SetString(variant.get()); } else { val->SetString(""); @@ -1031,7 +1031,7 @@ nsComputedDOMStyle::GetBackgroundColor(nsIFrame *aFrame, const nsCString& backgroundColor = nsCSSProps::SearchKeywordTable(NS_STYLE_BG_COLOR_TRANSPARENT, nsCSSProps::kBackgroundColorKTable); - val->SetString(backgroundColor); + val->SetString(backgroundColor.get()); } else { nsAutoString hex; @@ -1118,7 +1118,7 @@ nsComputedDOMStyle::GetBorderCollapse(nsIFrame *aFrame, const nsCString& ident= nsCSSProps::SearchKeywordTable(table->mBorderCollapse, nsCSSProps::kBorderCollapseKTable); - val->SetString(ident); + val->SetString(ident.get()); } else { val->SetString(""); @@ -1324,7 +1324,7 @@ nsComputedDOMStyle::GetOutlineStyle(nsIFrame *aFrame, const nsCString& style= nsCSSProps::SearchKeywordTable(outline->GetOutlineStyle(), nsCSSProps::kBorderStyleKTable); - val->SetString(style); + val->SetString(style.get()); } else { val->SetString(""); @@ -1425,7 +1425,7 @@ nsComputedDOMStyle::GetTextAlign(nsIFrame *aFrame, const nsCString& align= nsCSSProps::SearchKeywordTable(text->mTextAlign, nsCSSProps::kTextAlignKTable); - val->SetString(align); + val->SetString(align.get()); } else { val->SetString("start"); @@ -1449,7 +1449,7 @@ nsComputedDOMStyle::GetTextDecoration(nsIFrame *aFrame, const nsCString& decoration= nsCSSProps::SearchKeywordTable(text->mTextDecoration, nsCSSProps::kTextDecorationKTable); - val->SetString(decoration); + val->SetString(decoration.get()); } else { val->SetString(""); @@ -1473,7 +1473,7 @@ nsComputedDOMStyle::GetVisibility(nsIFrame *aFrame, const nsCString& value= nsCSSProps::SearchKeywordTable(visibility->mVisible, nsCSSProps::kVisibilityKTable); - val->SetString(value); + val->SetString(value.get()); } else { val->SetString(""); @@ -2352,7 +2352,7 @@ nsComputedDOMStyle::GetBorderWidthFor(PRUint8 aSide, const nsCString& width= nsCSSProps::SearchKeywordTable(coord.GetIntValue(), nsCSSProps::kBorderWidthKTable); - val->SetString(width); break; + val->SetString(width.get()); break; } default: NS_WARNING("double check the unit"); @@ -2465,7 +2465,7 @@ nsComputedDOMStyle::GetBorderStyleFor(PRUint8 aSide, const nsCString& style= nsCSSProps::SearchKeywordTable(border->GetBorderStyle(aSide), nsCSSProps::kBorderStyleKTable); - val->SetString(style); + val->SetString(style.get()); } else { val->SetString("");