Remove localLock notifications

RESOLVED FIXED in 0.3

Status

RESOLVED FIXED
10 years ago
10 years ago

People

(Reporter: Mardak, Assigned: Mardak)

Tracking

unspecified
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Assignee)

Description

10 years ago
From bug 482178 comment 5.. localLock should be something like the notify wrapper:
http://hg.mozilla.org/labs/weave/file/tip/modules/service.js#l117

thunder: Couldn't we just set _notify in the prototype, same thing for localLock

{
  _notify: Wrap.notify("weave:service:"),
  _localLock: Wrap.localLock("weave:service:"),
  ...
}

Just checking.. we should use the same prefix?
Yes, the main point is that you execute it rather than just setting it.

Executing it directly in the prototype does mean, however, that other objects that inherit form it (use it as their prototype) will also inherit the prefix, unless they override _notify and _localLock.  By setting it in the constructor you make sure that objects that inherit from this one won't have a _notify or _localLock at all.

... come to think of it, though, we don't use the local-lock notifications anywhere.  You could just remove the observer notifications altogether from localLock.

We can always add them back (correctly) if we ever need them.
(Assignee)

Comment 2

10 years ago
http://hg.mozilla.org/labs/weave/rev/1968787b5cd1
Assignee: nobody → edilee
Status: NEW → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED
Summary: Correctly prefix localLock notifications → Remove localLock notifications
Target Milestone: -- → 0.3
Component: Weave → General
Product: Mozilla Labs → Weave
Version: Trunk → unspecified
QA Contact: weave → general
You need to log in before you can comment on or make changes to this bug.