Closed Bug 717976 Opened 9 years ago Closed 9 years ago

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

Categories

(Thunderbird :: General, defect)

defect
Not set
trivial

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 13.0

People

(Reporter: sgautherie, Assigned: mkmelin)

References

()

Details

Attachments

(1 file)

(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
Duplicate of this bug: 722266
Attached patch proposed fixSplinter Review
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+
http://hg.mozilla.org/comm-central/rev/1b3e8b3c517c 
-> FIXED
Status: ASSIGNED → RESOLVED
Closed: 9 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.