Closed Bug 561005 Opened 11 years ago Closed 11 years ago

Use FakeSvc to grab binary crypto if js-ctypes doesn't work

Categories

(Firefox :: Sync, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: Mardak, Assigned: Mardak)

References

Details

Attachments

(1 file, 1 obsolete file)

Right now there's extra logic to check versions and pick ;1 or ;2. If ctypes ;2 fails to register, we can fall back to the binary.
Attached patch v1 (obsolete) — Splinter Review
Assignee: nobody → edilee
Status: NEW → ASSIGNED
Attachment #440677 - Flags: review?(paul)
Comment on attachment 440677 [details] [diff] [review]
v1

>+// Grab the binary implementation of WeaveCrypto if js-ctypes doesn't work
>+Utils.lazySvc(FakeSvc, "@labs.mozilla.com/Weave/Crypto;2",
>+              "@labs.mozilla.com/Weave/Crypto;1", "IWeaveCrypto");
>+

How about just a better comment explaining that you're adding ;1 as ;2 iff ;2 doesn't exist. You're comment, while technically correct, doesn't really explain the trickiness you're doing. Like most code you write, it's more compact, but not terribly obvious.
Attachment #440677 - Flags: review?(paul) → review+
Attached patch v1.1Splinter Review
Attachment #440677 - Attachment is obsolete: true
Attachment #442130 - Flags: review?(mconnor)
Attachment #442130 - Flags: review?(mconnor) → review+
http://hg.mozilla.org/labs/weave/rev/92821303ad46
Lazily load the binary component service onto FakeSvc if ;2 fails to register on Svc.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.3b3
Blocks: 561480
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.