From 87d60625cc343d571af1f1016f684824119eddb0 Mon Sep 17 00:00:00 2001 From: "dougt%meer.net" Date: Thu, 9 Feb 2006 18:52:28 +0000 Subject: [PATCH] Fixing bug 326358. checking for null mStringBundle is not needed. r/a=kaie git-svn-id: svn://10.0.0.236/trunk@189491 18797224-902f-48f8-a5cc-f745e15eee43 --- .../manager/boot/src/nsSecureBrowserUIImpl.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/mozilla/security/manager/boot/src/nsSecureBrowserUIImpl.cpp b/mozilla/security/manager/boot/src/nsSecureBrowserUIImpl.cpp index 892cfecf6d7..46ce2e48949 100644 --- a/mozilla/security/manager/boot/src/nsSecureBrowserUIImpl.cpp +++ b/mozilla/security/manager/boot/src/nsSecureBrowserUIImpl.cpp @@ -194,9 +194,13 @@ nsSecureBrowserUIImpl::Init(nsIDOMWindow *window) nsCOMPtr service(do_GetService(NS_STRINGBUNDLE_CONTRACTID, &rv)); if (NS_FAILED(rv)) return rv; - rv = service->CreateBundle(SECURITY_STRING_BUNDLE_URL, - getter_AddRefs(mStringBundle)); - if (NS_FAILED(rv)) return rv; + // We do not need to test for mStringBundle here... + // Anywhere we use it, we will test before using. Some + // embedded users of PSM may want to reuse our + // nsSecureBrowserUIImpl implementation without the + // bundle. + service->CreateBundle(SECURITY_STRING_BUNDLE_URL, getter_AddRefs(mStringBundle)); + // hook up to the form post notifications: nsCOMPtr svc(do_GetService("@mozilla.org/observer-service;1", &rv));