From f35bcd4e090bb24ee9dfdf7ef6f5dfa6066a3115 Mon Sep 17 00:00:00 2001 From: "bsmedberg%covad.net" Date: Wed, 23 Feb 2005 00:01:54 +0000 Subject: [PATCH] From bug 278534 - Can't have NS_NAMED_LITERAL_CSTRING at static/global scope, because the XPCOM library can be unloaded before the module cleanup fires. Should clear up cadence orange. git-svn-id: svn://10.0.0.236/trunk@169624 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/chrome/src/nsChromeRegistry.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/mozilla/chrome/src/nsChromeRegistry.cpp b/mozilla/chrome/src/nsChromeRegistry.cpp index b9f5df51f9d..226fad9fa1e 100644 --- a/mozilla/chrome/src/nsChromeRegistry.cpp +++ b/mozilla/chrome/src/nsChromeRegistry.cpp @@ -522,11 +522,12 @@ nsChromeRegistry::GetProviderAndPath(nsIURL* aChromeURL, return NS_OK; } -static NS_NAMED_LITERAL_CSTRING(kSlash, "/"); nsresult nsChromeRegistry::Canonify(nsIURL* aChromeURL) { + NS_NAMED_LITERAL_CSTRING(kSlash, "/"); + nsresult rv; nsCAutoString provider, path; @@ -1482,13 +1483,15 @@ GetResourceName(nsIRDFResource* res, nsACString& result) result.Assign(Substring(providerURI, found + 1)); } -static NS_NAMED_LITERAL_CSTRING(kTab, "\t"); void nsChromeRegistry::ProcessProvider(PRFileDesc *fd, nsIRDFService* aRDFs, nsIRDFDataSource* aDS, nsIRDFResource* aRoot, PRBool aIsLocale, const nsACString& aBaseURL) { + NS_NAMED_LITERAL_CSTRING(kSlash, "/"); + NS_NAMED_LITERAL_CSTRING(kTab, "\t"); + nsresult rv; nsCOMPtr packagesarc; @@ -1582,13 +1585,14 @@ GetLiteralText(nsIRDFLiteral* lit, nsACString& result) CopyUTF16toUTF8(value, result); } -static NS_NAMED_LITERAL_CSTRING(kLinebreak, NS_LINEBREAK); - void nsChromeRegistry::ProcessOverlays(PRFileDesc *fd, nsIRDFDataSource* aDS, nsIRDFResource* aRoot, const nsCSubstring& aType) { + NS_NAMED_LITERAL_CSTRING(kTab, "\t"); + NS_NAMED_LITERAL_CSTRING(kLinebreak, NS_LINEBREAK); + nsresult rv; nsCOMPtr overlaids;