Thunderbird getBrowserURL() may return (SeaMonkey) "chrome://navigator/content/navigator.xul"

RESOLVED FIXED in Thunderbird 13.0

Status

Thunderbird
General
--
trivial
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: sgautherie, Assigned: Magnus Melin)

Tracking

Trunk
Thunderbird 13.0
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Reporter)

Description

6 years ago
(Noticed while checking bug 717753.)

Code is:
{
53 function getBrowserURL() {
54 
55   try {
56     var prefs = Components.classes["@mozilla.org/preferences-service;1"]
57                          .getService(Components.interfaces.nsIPrefBranch);
58     var url = prefs.getCharPref("browser.chromeURL");
59     if (url)
60       return url;
61   } catch(e) {
62   }
63   return "chrome://navigator/content/navigator.xul";
64 }
}

"browser.chromeURL" is obviously the right thing to try :-)
"chrome://navigator/content/navigator.xul" is SeaMonkey specific ;-<

I'm not sure whether this function could be allowed to fail somehow.
If not, maybe TB should provide a fake browser page documenting the "no browser" case?
Or default to "chrome://messenger/content/messengercompose/messengercompose.xul"?
...

Ftr,
{
/mail/app/profile/all-thunderbird.js
    * line 53 -- pref("browser.chromeURL", "chrome://messenger/content/messengercompose/messengercompose.xul");
}
Severity: normal → trivial
(Assignee)

Updated

6 years ago
Duplicate of this bug: 722266
(Assignee)

Comment 2

6 years ago
Created attachment 600996 [details] [diff] [review]
proposed fix

Or maybe we should just hardcode the string. Is there value in having it be a pref?
Assignee: nobody → mkmelin+mozilla
Status: NEW → ASSIGNED
Attachment #600996 - Flags: review?(mbanner)
Comment on attachment 600996 [details] [diff] [review]
proposed fix

So this will throw if getCharPref fails, but I'm fine with that because we should be finding out why that's failing, if it is.
Attachment #600996 - Flags: review?(mbanner) → review+
(Assignee)

Comment 4

6 years ago
http://hg.mozilla.org/comm-central/rev/1b3e8b3c517c 
-> FIXED
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Summary: [Thunderbird] Investigate getBrowserURL() which returns (SeaMonkey) "chrome://navigator/content/navigator.xul" → Thunderbird getBrowserURL() may return (SeaMonkey) "chrome://navigator/content/navigator.xul"
Target Milestone: --- → Thunderbird 13.0
You need to log in before you can comment on or make changes to this bug.