"Helper Applications" panel in preferences window unusable on a "non Gnome" system

RESOLVED FIXED in seamonkey2.1b2

Status

SeaMonkey
Preferences
RESOLVED FIXED
7 years ago
6 years ago

People

(Reporter: Manuel Reimer, Assigned: Manuel Reimer)

Tracking

Trunk
seamonkey2.1b2
x86
Linux

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 2 obsolete attachments)

(Assignee)

Description

7 years ago
I've set up a plain KDE system and getting following errors in error console:

Error: prefpane.paneload: loadSubScript("chrome://communicator/content/pref/pref-applications.js") failed:
[Exception... "Component returned failure code: 0x80570016 (NS_ERROR_XPC_GS_RETURNED_FAILURE) [nsIJSCID.getService]"  nsresult: "0x80570016 (NS_ERROR_XPC_GS_RETURNED_FAILURE)"  location: "JS frame :: chrome://communicator/content/pref/pref-applications.js :: <TOP_LEVEL> :: line 80"  data: no]
Source File: chrome://communicator/content/bindings/prefwindow.xml
Line: 563

I tracked this down to the following line of code:
http://mxr.mozilla.org/comm-central/source/suite/shell/src/nsGNOMEShellService.cpp#64

In my case *both* (gconf *and* vfs) are unavailable.

I've attached a patch against pref-applications.js to wrap the service generation into a "try/catch".
(Assignee)

Comment 1

7 years ago
Created attachment 485765 [details] [diff] [review]
Fix
Attachment #485765 - Flags: review?(neil)

Comment 2

7 years ago
Comment on attachment 485765 [details] [diff] [review]
Fix

Would you mind putting the try/catch inside the if, rather than outside?

I wonder whether it's better to remove the test for gconf/vfs in the shell service init routine, and add it in those methods that need it as and when.
(Assignee)

Comment 3

7 years ago
Created attachment 486021 [details] [diff] [review]
Second patch
Attachment #485765 - Attachment is obsolete: true
Attachment #486021 - Flags: review?(neil)
Attachment #485765 - Flags: review?(neil)
(Assignee)

Comment 4

7 years ago
> I wonder whether it's better to remove the test for gconf/vfs in the shell
> service init routine, and add it in those methods that need it as and when.

At least nsGNOMEShellService.cpp just checks for them, but never seems to actually use those variables...

I commented the whole block (check for gconf and vfs) and SeaMonkey compiled without errors.

Then I had a look at the nsGNOMEShellService.cpp used by firefox and theirs is much longer. Maybe we should copy this over and make our code work with this file?
http://mxr.mozilla.org/comm-central/source/mozilla/browser/components/shell/src/nsGNOMEShellService.cpp
Status: NEW → ASSIGNED

Comment 5

7 years ago
(In reply to comment #4)
> Then I had a look at the nsGNOMEShellService.cpp used by firefox and theirs is
> much longer. Maybe we should copy this over and make our code work with this
> file?
> http://mxr.mozilla.org/comm-central/source/mozilla/browser/components/shell/src/nsGNOMEShellService.cpp

There is already a bug for that... I'd started work on it, but the trouble was that the code that uses the shell service is all-or-nothing, so you can't easily implement (say) set as background first, and then something else later.

Comment 6

7 years ago
(In reply to comment #2)
> I wonder whether it's better to remove the test for gconf/vfs in the shell
> service init routine, and add it in those methods that need it as and when.

That actually sounds like a good idea to me.
(Assignee)

Comment 7

7 years ago
Created attachment 487928 [details] [diff] [review]
Patch, fixing the check in nsGNOMEShellService::Init

For our "limited" nsGNOMEShellService.cpp, the fix is as simple as the one, I've attached. I dropped the unused gconf and vfs variables and the check itself. Compiles well and makes the helper application prefpane work on my KDE-only system.
Attachment #486021 - Attachment is obsolete: true
Attachment #487928 - Flags: superreview?(neil)
Attachment #487928 - Flags: review?(neil)
Attachment #486021 - Flags: review?(neil)
(Assignee)

Comment 8

7 years ago
Asking for "blocking SM 2.1" as I think we should ship SeaMonkey with a working "Helper Applications" pane.
blocking-seamonkey2.1: --- → ?

Updated

7 years ago
Attachment #487928 - Flags: superreview?(neil)
Attachment #487928 - Flags: superreview+
Attachment #487928 - Flags: review?(neil)
Attachment #487928 - Flags: review+
(Assignee)

Updated

7 years ago
Keywords: checkin-needed

Comment 9

7 years ago
Pushed to comm-central
http://hg.mozilla.org/comm-central/rev/57f863e0caad
Status: ASSIGNED → RESOLVED
Last Resolved: 7 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → seamonkey2.1b2

Updated

7 years ago
blocking-seamonkey2.1: ? → ---
Wouldn't it make sense to also remove the header includes? They seem to be unused now:
#include "nsIGConfService.h"
and
#include "nsIGnomeVFSService.h"

FTR: FF did their fix for a similar problem in Bug 624267, differently.
You need to log in before you can comment on or make changes to this bug.