Fix for Bug 99163, Checking in for dougt@netscape.com,r=shaver, sr=jband

This commit is contained in:
javi%netscape.com 2001-10-22 22:30:18 +00:00
Родитель 4d391277b8
Коммит 2e4b6a79ea
2 изменённых файлов: 3 добавлений и 5 удалений

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

@ -34,7 +34,6 @@
#include "nsIStreamListener.h"
#include "nsIStringBundle.h"
#include "nsIDirectoryService.h"
#include "nsObserverService.h"
#include "nsCURILoader.h"
#include "nsDirectoryServiceDefs.h"
#include "nsIProxyObjectManager.h"
@ -869,7 +868,7 @@ nsNSSComponent::Observe(nsISupports *aSubject, const char *aTopic,
nsresult
nsNSSComponent::RegisterProfileChangeObserver()
{
nsCOMPtr<nsIObserverService> observerService(do_GetService(NS_OBSERVERSERVICE_CONTRACTID));
nsCOMPtr<nsIObserverService> observerService(do_GetService("@mozilla.org/observer-service;1"));
NS_ASSERTION(observerService, "could not get observer service");
if (observerService) {
observerService->AddObserver(this, PROFILE_BEFORE_CHANGE_TOPIC, PR_TRUE);

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

@ -41,7 +41,6 @@
#include "nsIServiceManager.h"
#include "nsIScriptGlobalObject.h"
#include "nsIObserverService.h"
#include "nsObserverService.h"
#include "nsIDocumentLoader.h"
#include "nsCURILoader.h"
#include "nsIDocShell.h"
@ -99,7 +98,7 @@ nsSecureBrowserUIImpl::~nsSecureBrowserUIImpl()
{
nsresult rv;
// remove self from form post notifications:
nsCOMPtr<nsIObserverService> svc(do_GetService(NS_OBSERVERSERVICE_CONTRACTID, &rv));
nsCOMPtr<nsIObserverService> svc(do_GetService("@mozilla.org/observer-service;1", &rv));
if (NS_SUCCEEDED(rv)) {
svc->RemoveObserver(this, NS_FORMSUBMIT_SUBJECT);
}
@ -130,7 +129,7 @@ nsSecureBrowserUIImpl::Init(nsIDOMWindow *window,
if (NS_FAILED(rv)) return rv;
// hook up to the form post notifications:
nsCOMPtr<nsIObserverService> svc(do_GetService(NS_OBSERVERSERVICE_CONTRACTID, &rv));
nsCOMPtr<nsIObserverService> svc(do_GetService("@mozilla.org/observer-service;1", &rv));
if (NS_SUCCEEDED(rv)) {
rv = svc->AddObserver(this, NS_FORMSUBMIT_SUBJECT, PR_TRUE);
}