chat message style preferences not fully working (not loading initial preview)

RESOLVED FIXED in Thunderbird 66.0

Status

defect
RESOLVED FIXED
7 months ago
7 months ago

People

(Reporter: mkmelin, Assigned: mkmelin)

Tracking

({regression})

Trunk
Thunderbird 66.0

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

+++ This bug was initially created as a clone of Bug #1519091 +++
Bug 1519091 made the main chat conversation browser work again, but the preview browser used in Preferences | Chat | Message styles is still not fully working.

Changing the theme will load the selected theme properly (AFAICT), but the initial load fails:

JavaScript error: resource:///modules/imThemes.jsm, line 592: TypeError: aConv is null

Somehow initHTMLDocument gets called with a null conv, and we end up here.

The messagestyle.js conv assignments look somewhat fishy. I'm not sure it ends up getting the conv from the right object. But it may also be something else.

The problem you have here is that the "init" method of the conversation browser is called by the messagestyle.js code before the connectedCallback method is triggered.

Moving the this._conv = null line from connectedCallback to the constructor fixes the aConv is null error, but there's another failure (JavaScript error: chrome://global/content/elements/browser-custom-element.js, line 881: NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIWebProgress.removeProgressListener]). To fix that one you need to move the this.progressListener = { ... } object to the constructor too. And then the preview works :-).

Great! Do you want to send a patch? If not, assign it to me and I'll take care

Assignee: nobody → mkmelin+mozilla

Your suggestion wfm.

Attachment #9037948 - Flags: review?(florian)
Status: NEW → ASSIGNED
Comment on attachment 9037948 [details] [diff] [review]
bug1521480_chat_preview.patch

Review of attachment 9037948 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks!
Attachment #9037948 - Flags: review?(florian) → review+
Keywords: checkin-needed

Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/2560743a5174
move conversation-browser this._conv and this.progressListener setup from connectedCallback to constructor to make chat theme preview work properly. r=florian

Status: ASSIGNED → RESOLVED
Closed: 7 months ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 66.0
You need to log in before you can comment on or make changes to this bug.