зеркало из https://github.com/mozilla/gecko-dev.git
Bug 854948 - GCLI context.environment.contentDocument points to doc from when GCLI first opened; r=mratcliffe
This commit is contained in:
Родитель
4398f0d11e
Коммит
33fb441011
|
@ -7308,12 +7308,10 @@ exports.Output = Output;
|
|||
* Functions and data related to the execution of a command
|
||||
*/
|
||||
exports.createExecutionContext = function(requisition) {
|
||||
return {
|
||||
var context = {
|
||||
exec: requisition.exec.bind(requisition),
|
||||
update: requisition.update.bind(requisition),
|
||||
updateExec: requisition.updateExec.bind(requisition),
|
||||
document: requisition.document,
|
||||
environment: requisition.environment,
|
||||
createView: view.createView,
|
||||
typedData: function(data, type) {
|
||||
return {
|
||||
|
@ -7334,6 +7332,18 @@ exports.createExecutionContext = function(requisition) {
|
|||
return Promise.defer();
|
||||
}
|
||||
};
|
||||
|
||||
Object.defineProperty(context, 'environment', {
|
||||
get: function() { return requisition.environment; },
|
||||
enumerable : true
|
||||
});
|
||||
|
||||
Object.defineProperty(context, 'document', {
|
||||
get: function() { return requisition.document; },
|
||||
enumerable : true
|
||||
});
|
||||
|
||||
return context;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -506,7 +506,7 @@ DeveloperToolbar.prototype.destroy = function DT_destroy()
|
|||
let tabbrowser = this._chromeWindow.getBrowser();
|
||||
tabbrowser.tabContainer.removeEventListener("TabSelect", this, false);
|
||||
tabbrowser.tabContainer.removeEventListener("TabClose", this, false);
|
||||
tabbrowser.removeEventListener("load", this, true);
|
||||
tabbrowser.removeEventListener("load", this, true);
|
||||
tabbrowser.removeEventListener("beforeunload", this, true);
|
||||
|
||||
Array.prototype.forEach.call(tabbrowser.tabs, this._stopErrorsCount, this);
|
||||
|
|
Загрузка…
Ссылка в новой задаче