service.js style improvements

RESOLVED FIXED in mozilla17

Status

Cloud Services
Firefox Sync: Backend
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: gps, Assigned: gps)

Tracking

unspecified
mozilla17
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

6 years ago
Created attachment 650319 [details] [diff] [review]
Fix minor style nits in service.js, v1

I was looking at service.js and OH GOD MY EYES ARE ON FIRE. This makes some of the burning go away.
Attachment #650319 - Flags: review?(rnewman)
Comment on attachment 650319 [details] [diff] [review]
Fix minor style nits in service.js, v1

Review of attachment 650319 [details] [diff] [review]:
-----------------------------------------------------------------

::: services/sync/modules/service.js
@@ +385,5 @@
>        engines = pref.split(",");
>      }
>  
>      // Grab the actual engines and register them
> +    Engines.register(engines.map(function onItem(name) Weave[name + "Engine"]));

Also add { return }.

@@ +774,5 @@
>      }
>    },
>  
> +  changePassword: function changePassword(newpass)
> +    this._notify("changepwd", "", function onNotify() {

While you're here breaking blame: { return }.

@@ +796,5 @@
>        return true;
>      })(),
>  
> +  changePassphrase: function changePassphrase(newphrase)
> +    this._catch(this._notify("changepph", "", function onNotify() {

Likewise.

@@ +868,5 @@
>    },
>  
>    login: function login(username, password, passphrase)
>      this._catch(this._lock("service.js: login",
> +          this._notify("login", "", function onNotify() {

Oh, the indenting!
Attachment #650319 - Flags: review?(rnewman) → review+
(Assignee)

Comment 2

6 years ago
Created attachment 650353 [details] [diff] [review]
Fix minor style nits in service.js, v2

I want a 2nd set of eyes on the change to login(). The code makes my head hurt.
Assignee: nobody → gps
Attachment #650319 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #650353 - Flags: review?(rnewman)
Comment on attachment 650353 [details] [diff] [review]
Fix minor style nits in service.js, v2

Review of attachment 650353 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good to me. If existing tests pass will tell for sure :)
Attachment #650353 - Flags: review?(rnewman) → review+
(Assignee)

Comment 4

6 years ago
https://hg.mozilla.org/services/services-central/rev/e1c2f8982a9d
Target Milestone: --- → mozilla17
(Assignee)

Comment 5

6 years ago
https://hg.mozilla.org/mozilla-central/rev/e1c2f8982a9d
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.