Closed Bug 781348 Opened 12 years ago Closed 12 years ago

service.js style improvements

Categories

(Firefox :: Sync, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla17

People

(Reporter: gps, Assigned: gps)

Details

Attachments

(1 file, 1 obsolete file)

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+
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+
https://hg.mozilla.org/mozilla-central/rev/e1c2f8982a9d
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Component: Firefox Sync: Backend → Sync
Product: Cloud Services → Firefox
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: