Bug 575536 - Don't leak WindowDraggingElement into the global scope. r=enn

This commit is contained in:
Dão Gottwald 2010-06-29 17:09:32 +02:00
parent 3bbd6ff1d6
commit ed87cd6b53
2 changed files with 9 additions and 6 deletions

View File

@ -165,8 +165,9 @@
if (!this._draggableStarted) {
this._draggableStarted = true;
try {
Components.utils.import("resource://gre/modules/WindowDraggingUtils.jsm");
new WindowDraggingElement(this, window);
let tmp = {};
Components.utils.import("resource://gre/modules/WindowDraggingUtils.jsm", tmp);
new tmp.WindowDraggingElement(this, window);
} catch (e) {}
}
</constructor>
@ -270,8 +271,9 @@
if (!this._draggableStarted) {
this._draggableStarted = true;
try {
Components.utils.import("resource://gre/modules/WindowDraggingUtils.jsm");
new WindowDraggingElement(this, window);
let tmp = {};
Components.utils.import("resource://gre/modules/WindowDraggingUtils.jsm", tmp);
new tmp.WindowDraggingElement(this, window);
} catch (e) {}
}
</constructor>

View File

@ -445,8 +445,9 @@
if (!this._draggableStarted) {
this._draggableStarted = true;
try {
Components.utils.import("resource://gre/modules/WindowDraggingUtils.jsm");
let draggableThis = new WindowDraggingElement(this, window);
let tmp = {};
Components.utils.import("resource://gre/modules/WindowDraggingUtils.jsm", tmp);
let draggableThis = new tmp.WindowDraggingElement(this, window);
draggableThis.mouseDownCheck = function(e) {
// Don't move while customizing.
return !this.parentNode.customizing;