Bug 1659589: Remove error event listener that set to stylesheet actor. r=ochameau

Depends on D87047

Differential Revision: https://phabricator.services.mozilla.com/D88531
This commit is contained in:
Daisuke Akatsuka 2020-09-01 01:44:28 +00:00
parent b9e65b07d6
commit a16d25d9f6

View File

@ -115,7 +115,6 @@ function StyleSheetEditor(
}
this.onPropertyChange = this.onPropertyChange.bind(this);
this._onError = this._onError.bind(this);
this.onMediaRulesChanged = this.onMediaRulesChanged.bind(this);
this.checkLinkedFileForChanges = this.checkLinkedFileForChanges.bind(this);
this.markLinkedFileBroken = this.markLinkedFileBroken.bind(this);
@ -125,7 +124,6 @@ function StyleSheetEditor(
this._onMouseMove = this._onMouseMove.bind(this);
this._focusOnSourceEditorReady = false;
this.styleSheet.on("error", this._onError);
this.savedFile = this.styleSheet.file;
this.linkCSSFile();
@ -442,15 +440,6 @@ StyleSheetEditor.prototype = {
this.emit("media-rules-changed", this.mediaRules);
},
/**
* Forward error event from stylesheet.
*
* @param {Object} data: The parameters to customize the error message
*/
_onError: function(data) {
this.emit("error", data);
},
/**
* Create source editor and load state into it.
* @param {DOMElement} inputElement
@ -899,7 +888,6 @@ StyleSheetEditor.prototype = {
}
this._sourceEditor.destroy();
}
this.styleSheet.off("error", this._onError);
this._isDestroyed = true;
},
};