Closed Bug 1556030 Opened 6 years ago Closed 6 years ago

JavaScript strict warning: chrome://messenger/content/preferences/cookies.js, line 527: ReferenceError: reference to undefined property "QueryInterface"

Categories

(Thunderbird :: General, defect)

defect
Not set
normal

Tracking

(thunderbird68 fixed, thunderbird69 fixed)

RESOLVED FIXED
Thunderbird 69.0
Tracking Status
thunderbird68 --- fixed
thunderbird69 --- fixed

People

(Reporter: jorgk-bmo, Assigned: aceman)

References

Details

Attachments

(1 file, 1 obsolete file)

JavaScript strict warning: chrome://messenger/content/preferences/cookies.js, line 527: ReferenceError: reference to undefined property "QueryInterface"

Strange, there is no QI at that line:
https://searchfox.org/comm-central/rev/d3a0f4232bb7b703258d7687572f7ade075c6401/mail/components/preferences/cookies.js#527

This shows in the debug console when pressing "Show Cookies" in the Privacy options.

Aceman, can you see what's going on here?

Flags: needinfo?(acelists)
Attached patch 1556030.patch (obsolete) — Splinter Review

Yes I can see the error in console.
This patch fixes it for me. It seems to me it produces the same result, just without the QI error.
Also other places in the file use this._view directly.

Assignee: nobody → acelists
Status: NEW → ASSIGNED
Flags: needinfo?(acelists)
Attachment #9070394 - Flags: review?(jorgk)
Comment on attachment 9070394 [details] [diff] [review] 1556030.patch Review of attachment 9070394 [details] [diff] [review]: ----------------------------------------------------------------- Any idea where the QI interface errors comes from? ::: mail/components/preferences/cookies.js @@ +37,5 @@ > }, > > _populateList(aInitialLoad) { > this._loadCookies(); > this._tree.view = this._view; Do you still need this assignment? And the one at line 753?

(In reply to Jorg K (GMT+2) from comment #2)

Any idea where the QI interface errors comes from?

No, I don't know.

::: mail/components/preferences/cookies.js

_populateList(aInitialLoad) {
this._loadCookies();
this._tree.view = this._view;
Do you still need this assignment? And the one at line 753?

Yes, these are needed otherwise the whole dialog breaks.

Comment on attachment 9070394 [details] [diff] [review] 1556030.patch Geoff, do you have an opinion here? cookies.js no longer exists in M-C, but it's there in m-esr60 with the lines Aceman is proposing to change now: https://dxr.mozilla.org/mozilla-esr60/source/browser/components/preferences/cookies.js#50 https://dxr.mozilla.org/mozilla-esr60/source/browser/components/preferences/cookies.js#544
Attachment #9070394 - Flags: review?(geoff)

I think gCookiesWindow._view should have a QueryInterface function (to nsITreeView, I guess) and that's what the error's complaining about.

Comment on attachment 9070394 [details] [diff] [review] 1556030.patch Let's see whether Geoff's suggestion from comment #5 helps.
Attachment #9070394 - Flags: review?(jorgk)
Attachment #9070394 - Flags: review?(geoff)
Attached patch 1556030.patch v2Splinter Review

Yes, that seems to work too, thanks.

Attachment #9070394 - Attachment is obsolete: true
Attachment #9073917 - Flags: review?(jorgk)
Comment on attachment 9073917 [details] [diff] [review] 1556030.patch v2 Thanks, works for me.
Attachment #9073917 - Flags: review?(jorgk)
Attachment #9073917 - Flags: review+
Attachment #9073917 - Flags: approval-comm-beta+

Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/3004cd1a0a75
add QI to nsITreeView for cookie view to stop JS warning. r=jorgk

Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 69.0
Blocks: 1582993
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: