Closed Bug 1453379 Opened Last year Closed Last year

Port Bug 1434768 - Basic structure for new session history APIs - Thunderbird busted 2018-04-11: No tabs or folder tree

Categories

(Thunderbird :: General, defect)

defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 61.0

People

(Reporter: jorgk, Assigned: jorgk)

Details

Attachments

(1 file, 1 obsolete file)

Debug console shows:

JavaScript strict warning: chrome://messenger/content/specialTabs.js, line 579:
ReferenceError: reference to undefined property "@mozilla.org/browser/shistory;1
"
JavaScript error: chrome://messenger/content/specialTabs.js, line 579: TypeError
: Cc['@mozilla.org/browser/shistory;1'] is undefined
++DOMWINDOW == 26 (000001BC9A564C00) [pid = 5044] [serial = 26] [outer = 000001B
C96FDCC00]
JavaScript strict warning: chrome://messenger/content/folderPane.js, line 405: R
eferenceError: reference to undefined property "_treeElement"
JavaScript error: chrome://messenger/content/folderPane.js, line 405: TypeError:
 this._treeElement is undefined
JavaScript strict warning: chrome://global/content/bindings/toolbar.xml, line 16
8: ReferenceError: reference to undefined property "statusText"

I don't know which one is more severe.

M-C last good: f6c3a0a19d82
M-C first bad: cfe6399e142c
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=f6c3a0a19d82&tochange=cfe6399e142c

Looks like this comes from bug 1434768.

Nika and Boris, what do we need to change?
Flags: needinfo?(nika)
Flags: needinfo?(bzbarsky)
Looks like this is one of the problems:
https://hg.mozilla.org/mozilla-central/diff/c1dc65552300/docshell/base/nsIWebNavigation.idl#l1.39
-  attribute nsISHistory sessionHistory;
+  [binaryname(SessionHistoryXPCOM)]
+  readonly attribute nsISupports sessionHistory;

We set this attribute at specialTabs.js, line 579:
    browser.webNavigation.sessionHistory =
      Cc["@mozilla.org/browser/shistory;1"]
        .createInstance(Ci.nsISHistory);
Attached patch 1453379-bustage-fix.patch (obsolete) — Splinter Review
I suspect you want to replace this:

    browser.webNavigation.sessionHistory =
      Cc["@mozilla.org/browser/shistory;1"]
        .createInstance(Ci.nsISHistory);

with:

    browser.docShell.initSessionHistory();

in specialTabs.js.  That should fix that problem.

If that doesn't fix the folderPane bit I can't tell you what's up with that.

The toolbar.xml bit is bug 1452059, right?
Flags: needinfo?(nika)
Flags: needinfo?(bzbarsky)
With my bustage fix patch the folder pane is back, that's a follow-on problem. I hadn't seen the statusText bit before, yes, it belongs in the other bug.

I'll try your fix now.
Summary: Thunderbird busted 2018-04-11: No tabs or folder tree → Port Bug 1434768 - Basic structure for new session history APIs - Thunderbird busted 2018-04-11: No tabs or folder tree
This works, thanks Boris!
Assignee: nobody → jorgk
Attachment #8967039 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/0ddd82b04560
Port Bug 1434768: Use new session history APIs. rs=bustage-fix
Status: ASSIGNED → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 61.0
Boris, thanks for your help. I landed this in a hurry and see no test failures. Any other APIs we need to replace?
Flags: needinfo?(bzbarsky)
Could be.  See https://bug1434768.bmoattachments.org/attachment.cgi?id=8950367 for the JS changes that got made to Firefox.

I see no uses of .sessionHistory in https://searchfox.org/comm-central/search?q=.sessionHistory&case=true&regexp=false&path=mail so that part looks ok.  Similar for calendar/.  Might be worth quickly checking for use of nsISHistory APIs, though.

There are a bunch in suite/ and those are likely broken now...
Flags: needinfo?(bzbarsky)
Thanks Boris. As you said .sessionHistory is only in the suite/ part of C-C. The same goes for nsISHistory APIs by which I suppose you mean nsISHistory*, so nsISHistory, nsISHistoryListener and nsISHistoryInternal.

FRG, this needs porting, especially assigning to .sessionHistory won't work any more:
suite/common/helpviewer/help.js
130 getWebNavigation().sessionHistory =
Flags: needinfo?(frgrahl)
Thanks Jorg. Put it in our master bug for later porting. Currently fixing up 60.
Flags: needinfo?(frgrahl)
You need to log in before you can comment on or make changes to this bug.