diff --git a/suite/browser/src/nsInternetSearchService.cpp b/suite/browser/src/nsInternetSearchService.cpp index 450c60ef842..54eacd5a21a 100755 --- a/suite/browser/src/nsInternetSearchService.cpp +++ b/suite/browser/src/nsInternetSearchService.cpp @@ -884,7 +884,8 @@ InternetSearchDataSource::Init() DeferredInit(); // Register as a profile change obsevrer - NS_WITH_SERVICE(nsIObserverService, observerService, NS_OBSERVERSERVICE_CONTRACTID, &rv); + nsCOMPtr observerService = + do_GetService(NS_OBSERVERSERVICE_CONTRACTID, &rv); if (observerService) { observerService->AddObserver(this, NS_LITERAL_STRING("profile-before-change").get()); observerService->AddObserver(this, NS_LITERAL_STRING("profile-do-change").get()); @@ -2426,8 +2427,8 @@ InternetSearchDataSource::GetInternetSearchURL(const char *searchEngineURI, char *utf8data = text.ToNewUTF8String(); if (utf8data) { - NS_WITH_SERVICE(nsITextToSubURI, textToSubURI, - kTextToSubURICID, &rv); + nsCOMPtr textToSubURI = + do_GetService(kTextToSubURICID, &rv); if (NS_SUCCEEDED(rv) && (textToSubURI)) { PRUnichar *uni = nsnull; @@ -3509,8 +3510,8 @@ InternetSearchDataSource::DoSearch(nsIRDFResource *source, nsIRDFResource *engin // "interpret/resultTranslationFont" since we always convert results to Unicode if (resultEncodingStr.Length() > 0) { - NS_WITH_SERVICE(nsICharsetConverterManager, charsetConv, - kCharsetConverterManagerCID, &rv); + nsCOMPtr charsetConv = + do_GetService(kCharsetConverterManagerCID, &rv); if (NS_SUCCEEDED(rv) && (charsetConv)) { rv = charsetConv->GetUnicodeDecoder(&resultEncodingStr, @@ -3535,8 +3536,8 @@ InternetSearchDataSource::DoSearch(nsIRDFResource *source, nsIRDFResource *engin char *utf8data = textTemp.ToNewUTF8String(); if (utf8data) { - NS_WITH_SERVICE(nsITextToSubURI, textToSubURI, - kTextToSubURICID, &rv); + nsCOMPtr textToSubURI = + do_GetService(kTextToSubURICID, &rv); if (NS_SUCCEEDED(rv) && (textToSubURI)) { PRUnichar *uni = nsnull; diff --git a/suite/browser/src/nsLocalSearchService.cpp b/suite/browser/src/nsLocalSearchService.cpp index e65e7249505..502ef3c6061 100755 --- a/suite/browser/src/nsLocalSearchService.cpp +++ b/suite/browser/src/nsLocalSearchService.cpp @@ -301,8 +301,8 @@ LocalSearchDataSource::parseResourceIntoFindTokens(nsIRDFResource *u, findTokenP { if (!strcmp(token, "text")) { - NS_WITH_SERVICE(nsITextToSubURI, textToSubURI, - kTextToSubURICID, &rv); + nsCOMPtr textToSubURI = + do_GetService(kTextToSubURICID, &rv); if (NS_SUCCEEDED(rv) && (textToSubURI)) { PRUnichar *uni = nsnull;