Bug 1325464 - Enable object-shorthand rule and run 'mach eslint --fix' with the rule enabled. r=MattN

MozReview-Commit-ID: 7E7LPorrEje
This commit is contained in:
Jared Wein
2016-12-29 18:34:54 -05:00
parent 2de0319338
commit e3149c378f
824 changed files with 7775 additions and 7789 deletions

View File

@@ -33,7 +33,7 @@ function shutdown(aData, aReason) {
// Register/unregister a constructor as a factory.
function Factory() {}
Factory.prototype = {
register: function(targetConstructor) {
register(targetConstructor) {
let proto = targetConstructor.prototype;
this._classID = proto.classID;
@@ -45,7 +45,7 @@ Factory.prototype = {
proto.contractID, factory);
},
unregister: function() {
unregister() {
let registrar = Cm.QueryInterface(Ci.nsIComponentRegistrar);
registrar.unregisterFactory(this._classID, this._factory);
this._factory = null;
@@ -55,14 +55,14 @@ Factory.prototype = {
var Presentation = {
// PUBLIC APIs
init: function() {
init() {
log("init");
// Register PresentationDevicePrompt into a XPCOM component.
Cu.import(PRESENTATION_DEVICE_PROMPT_PATH);
this._register();
},
uninit: function() {
uninit() {
log("uninit");
// Unregister PresentationDevicePrompt XPCOM component.
this._unregister();
@@ -70,13 +70,13 @@ var Presentation = {
},
// PRIVATE APIs
_register: function() {
_register() {
log("_register");
this._devicePromptFactory = new Factory();
this._devicePromptFactory.register(PresentationDevicePrompt);
},
_unregister: function() {
_unregister() {
log("_unregister");
this._devicePromptFactory.unregister();
delete this._devicePromptFactory;