Closed Bug 1566904 Opened 5 years ago Closed 5 years ago

this.contentWindow.getSelection(...) is null in conversation-browser.js

Categories

(Chat Core :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: aleca, Assigned: aleca)

Details

Attachments

(1 file)

Whenever a conversation window is closed, this error message appears in the console:

JavaScript error: chrome://chat/content/conversation-browser.js, line 306: TypeError: this.contentWindow.getSelection(...) is null

This condition fixes the issue, but I'm not sure if it's the right fix.
Is the chatSelectionListener applied at all without a selection?

Assignee: nobody → alessandro
Status: NEW → ASSIGNED
Attachment #9078797 - Flags: review?(kaie)
Comment on attachment 9078797 [details] [diff] [review]
1566904-conversation-browser.patch

Forwarding the review to Florian, who knows this code well.
Attachment #9078797 - Flags: review?(kaie) → review?(florian)

Is this a regression? This code is Linux-only so I can't test this locally right now.

https://searchfox.org/comm-central/rev/83c53edc42d3c830e1fd38d1b47bf71775ab3a14/chat/content/conversation-browser.js#299 is where the chatSelectionListener gets added.

This doesn't seem to happen anymore.
Can someone confirm it was fixed by some other update?

Side note, other error messages are popping out whenever a conversation is closed:
JavaScript error: chrome://chat/content/conversation-browser.js, line 373: TypeError: this.docShell is null
JavaScript error: chrome://chat/content/conversation-browser.js, line 283: TypeError: this.webNavigation is null
JavaScript error: resource://gre/modules/SessionStoreFunctions.jsm, line 392: NS_ERROR_FILE_NOT_FOUND:

Flags: needinfo?(jorgk)

What's the question? I can't confirm that the problem initially reported here is fixed, I never noticed it.

I've see the error from SessionStoreFunctions.jsm, yes, not the other two. May be worth investigating the two in conversation-browser.js.

Flags: needinfo?(jorgk)

Alex, because you were the original reporter, I think it's OK for you to decide if the issue is fixed.

You're reporting additional problems in comment 4. Are you saying, the errors from comment 4 aren't yet fixed?

Are the errors from comment 4 related to code we have touched, or are those other arbitrary places in the chat code?

If those are non-OTR places, I'd say either Florian or Patrick should check if they consider those errors a problem?

In addition, it would be interesting to find out if those are a regression, e.g. in which version they started to show up.

I'm gonna close this as the original issue seems to be fixed, and I'll open a dedicated bug for the issues wrote in comment 4 so we can try and find the regression.

Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → WORKSFORME
Attachment #9078797 - Flags: review?(florian)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: