зеркало из https://github.com/mozilla/gecko-dev.git
Fixed an nsString usage oopsie
This commit is contained in:
Родитель
b1ed8de092
Коммит
ca2b2003c6
|
@ -2458,13 +2458,14 @@ PRBool CSSParserImpl::ParseURL(PRInt32& aErrorCode, nsCSSValue& aValue)
|
|||
// XXX editors won't like this - too bad for now
|
||||
nsAutoString absURL;
|
||||
if (nsnull != mURL) {
|
||||
nsString baseURL;
|
||||
nsAutoString baseURL;
|
||||
nsresult rv;
|
||||
#ifdef NECKO
|
||||
nsCOMPtr<nsIURI> base;
|
||||
rv = mURL->Clone(getter_AddRefs(base));
|
||||
if (NS_SUCCEEDED(rv))
|
||||
rv = NS_MakeAbsoluteURI(nsCAutoString(tk->mIdent), base, absURL);
|
||||
nsCOMPtr<nsIURI> base;
|
||||
rv = mURL->Clone(getter_AddRefs(base));
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
rv = NS_MakeAbsoluteURI(tk->mIdent, base, absURL);
|
||||
}
|
||||
#else
|
||||
rv = NS_MakeAbsoluteURL(mURL, baseURL, tk->mIdent, absURL);
|
||||
#endif // NECKO
|
||||
|
|
|
@ -39,11 +39,13 @@ void nsXULAtoms::AddRefAtoms() {
|
|||
/* XUL Atoms registers the XUL name space ID because it's a convenient
|
||||
place to do this, if you don't want a permanent, "well-known" ID.
|
||||
*/
|
||||
if (NS_SUCCEEDED(NS_NewNameSpaceManager(&gNameSpaceManager)))
|
||||
if (NS_SUCCEEDED(NS_NewNameSpaceManager(&gNameSpaceManager))) {
|
||||
// gNameSpaceManager->CreateRootNameSpace(namespace);
|
||||
gNameSpaceManager->RegisterNameSpace(kXULNameSpace, nameSpaceID);
|
||||
else
|
||||
nsAutoString nameSpace(kXULNameSpace);
|
||||
gNameSpaceManager->RegisterNameSpace(nameSpace, nameSpaceID);
|
||||
} else {
|
||||
NS_ASSERTION(0, "failed to create xul atoms namespace manager");
|
||||
}
|
||||
|
||||
// now register the atoms
|
||||
#define XUL_ATOM(_name, _value) _name = NS_NewAtom(_value);
|
||||
|
|
|
@ -2458,13 +2458,14 @@ PRBool CSSParserImpl::ParseURL(PRInt32& aErrorCode, nsCSSValue& aValue)
|
|||
// XXX editors won't like this - too bad for now
|
||||
nsAutoString absURL;
|
||||
if (nsnull != mURL) {
|
||||
nsString baseURL;
|
||||
nsAutoString baseURL;
|
||||
nsresult rv;
|
||||
#ifdef NECKO
|
||||
nsCOMPtr<nsIURI> base;
|
||||
rv = mURL->Clone(getter_AddRefs(base));
|
||||
if (NS_SUCCEEDED(rv))
|
||||
rv = NS_MakeAbsoluteURI(nsCAutoString(tk->mIdent), base, absURL);
|
||||
nsCOMPtr<nsIURI> base;
|
||||
rv = mURL->Clone(getter_AddRefs(base));
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
rv = NS_MakeAbsoluteURI(tk->mIdent, base, absURL);
|
||||
}
|
||||
#else
|
||||
rv = NS_MakeAbsoluteURL(mURL, baseURL, tk->mIdent, absURL);
|
||||
#endif // NECKO
|
||||
|
|
|
@ -2458,13 +2458,14 @@ PRBool CSSParserImpl::ParseURL(PRInt32& aErrorCode, nsCSSValue& aValue)
|
|||
// XXX editors won't like this - too bad for now
|
||||
nsAutoString absURL;
|
||||
if (nsnull != mURL) {
|
||||
nsString baseURL;
|
||||
nsAutoString baseURL;
|
||||
nsresult rv;
|
||||
#ifdef NECKO
|
||||
nsCOMPtr<nsIURI> base;
|
||||
rv = mURL->Clone(getter_AddRefs(base));
|
||||
if (NS_SUCCEEDED(rv))
|
||||
rv = NS_MakeAbsoluteURI(nsCAutoString(tk->mIdent), base, absURL);
|
||||
nsCOMPtr<nsIURI> base;
|
||||
rv = mURL->Clone(getter_AddRefs(base));
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
rv = NS_MakeAbsoluteURI(tk->mIdent, base, absURL);
|
||||
}
|
||||
#else
|
||||
rv = NS_MakeAbsoluteURL(mURL, baseURL, tk->mIdent, absURL);
|
||||
#endif // NECKO
|
||||
|
|
|
@ -39,11 +39,13 @@ void nsXULAtoms::AddRefAtoms() {
|
|||
/* XUL Atoms registers the XUL name space ID because it's a convenient
|
||||
place to do this, if you don't want a permanent, "well-known" ID.
|
||||
*/
|
||||
if (NS_SUCCEEDED(NS_NewNameSpaceManager(&gNameSpaceManager)))
|
||||
if (NS_SUCCEEDED(NS_NewNameSpaceManager(&gNameSpaceManager))) {
|
||||
// gNameSpaceManager->CreateRootNameSpace(namespace);
|
||||
gNameSpaceManager->RegisterNameSpace(kXULNameSpace, nameSpaceID);
|
||||
else
|
||||
nsAutoString nameSpace(kXULNameSpace);
|
||||
gNameSpaceManager->RegisterNameSpace(nameSpace, nameSpaceID);
|
||||
} else {
|
||||
NS_ASSERTION(0, "failed to create xul atoms namespace manager");
|
||||
}
|
||||
|
||||
// now register the atoms
|
||||
#define XUL_ATOM(_name, _value) _name = NS_NewAtom(_value);
|
||||
|
|
Загрузка…
Ссылка в новой задаче