Bug 1556030 - add QI to nsITreeView for cookie view to stop JS warning. r=jorgk
authorGeoff Lankow <geoff@thunderbird.net>
Tue, 25 Jun 2019 12:25:00 +0200
changeset 35951 3004cd1a0a75432d7e04592580a8a7511f38dab5
parent 35950 4aed62fba5e7c54c0f66cdcdedd5ab917bd1d7d4
child 35952 d15c56d62143a589c71354a0659e3f5488a6540b
push id392
push userclokep@gmail.com
push dateMon, 02 Sep 2019 20:17:19 +0000
reviewersjorgk
bugs1556030
Bug 1556030 - add QI to nsITreeView for cookie view to stop JS warning. r=jorgk
mail/components/preferences/cookies.js
--- a/mail/components/preferences/cookies.js
+++ b/mail/components/preferences/cookies.js
@@ -1,18 +1,16 @@
 /* -*- Mode: Javascript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");
 var {PluralForm} = ChromeUtils.import("resource://gre/modules/PluralForm.jsm");
 
-var nsICookie = Ci.nsICookie;
-
 var gCookiesWindow = {
   _hosts: {},
   _hostOrder: [],
   _tree: null,
   _bundle: null,
 
   init() {
     Services.obs.addObserver(this, "cookie-changed");
@@ -168,16 +166,17 @@ var gCookiesWindow = {
     var oldRowCount = this._rowCount;
     this._view._rowCount += rowCountImpact;
     this._tree.rowCountChanged(oldRowCount - 1, rowCountImpact);
 
     document.getElementById("removeAllCookies").disabled = this._view._filtered;
   },
 
   _view: {
+    QueryInterface: ChromeUtils.generateQI([Ci.nsITreeView]),
     _filtered: false,
     _filterSet: [],
     _filterValue: "",
     _rowCount: 0,
     _cacheValid: 0,
     _cacheItems: [],
     get rowCount() {
       return this._rowCount;