From fe67a1bf607b395c0c802e1439b0705a0fcaf5a5 Mon Sep 17 00:00:00 2001 From: "bryner%brianryner.com" Date: Tue, 6 Jul 2004 08:51:48 +0000 Subject: [PATCH] Fix Firefox Xremote on the trunk by bringing blizzard's patch for bug 244060 over from the Aviary branch. r=bsmedberg, sr=bryner. git-svn-id: svn://10.0.0.236/trunk@158790 18797224-902f-48f8-a5cc-f745e15eee43 --- .../components/xremote/src/XRemoteService.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/mozilla/xpfe/components/xremote/src/XRemoteService.cpp b/mozilla/xpfe/components/xremote/src/XRemoteService.cpp index 068571cb550..d91d75b3098 100644 --- a/mozilla/xpfe/components/xremote/src/XRemoteService.cpp +++ b/mozilla/xpfe/components/xremote/src/XRemoteService.cpp @@ -413,9 +413,21 @@ XRemoteService::AddBrowserInstance(nsIDOMWindowInternal *aBrowser) nsCAutoString profile; GetProfileName(profile); + // Make sure that the profile is actually set to something. + const char *profileTmp = NULL; + if (profile.Length()) + profileTmp = profile.get(); + + // Normalize program names to lower case and make sure it actually + // has a value. + ToLowerCase(mProgram); + const char *programTmp = NULL; + if (mProgram.Length()) + programTmp = mProgram.get(); + nsresult rv; - rv = widgetHelper->EnableXRemoteCommands(mainWidget, profile.get(), - mProgram.get()); + rv = widgetHelper->EnableXRemoteCommands(mainWidget, profileTmp, + programTmp); if (NS_FAILED(rv)) { NS_WARNING("failed to enable x remote commands for widget"); return rv;