mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1020832 tabbrowser's constructor shouldn't use Cc and Ci since using it sometimes causes undefined error r=enndeakin
This commit is contained in:
parent
5525f3dda5
commit
c2c42b4d67
@ -3067,7 +3067,10 @@
|
||||
this.mCurrentBrowser = document.getAnonymousElementByAttribute(this, "anonid", "initialBrowser");
|
||||
|
||||
this.mCurrentTab = this.tabContainer.firstChild;
|
||||
let els = Cc["@mozilla.org/eventlistenerservice;1"].getService(Ci.nsIEventListenerService);
|
||||
const nsIEventListenerService =
|
||||
Components.interfaces.nsIEventListenerService;
|
||||
let els = Components.classes["@mozilla.org/eventlistenerservice;1"]
|
||||
.getService(nsIEventListenerService);
|
||||
els.addSystemEventListener(document, "keydown", this, false);
|
||||
els.addSystemEventListener(document, "keypress", this, false);
|
||||
window.addEventListener("sizemodechange", this, false);
|
||||
@ -3147,7 +3150,10 @@
|
||||
this.mTabListeners[i].destroy();
|
||||
this.mTabListeners[i] = null;
|
||||
}
|
||||
let els = Cc["@mozilla.org/eventlistenerservice;1"].getService(Ci.nsIEventListenerService);
|
||||
const nsIEventListenerService =
|
||||
Components.interfaces.nsIEventListenerService;
|
||||
let els = Components.classes["@mozilla.org/eventlistenerservice;1"]
|
||||
.getService(nsIEventListenerService);
|
||||
els.removeSystemEventListener(document, "keydown", this, false);
|
||||
els.removeSystemEventListener(document, "keypress", this, false);
|
||||
window.removeEventListener("sizemodechange", this, false);
|
||||
|
Loading…
Reference in New Issue
Block a user