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

RESOLVED FIXED in 1.3b3

Status

()

RESOLVED FIXED
9 years ago
3 months ago

People

(Reporter: Mardak, Assigned: Mardak)

Tracking

unspecified
1.3b3
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

2.45 KB, patch
mconnor
: review+
Details | Diff | Splinter Review
(Assignee)

Description

9 years ago
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.
(Assignee)

Comment 1

9 years ago
Created attachment 440677 [details] [diff] [review]
v1
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+
(Assignee)

Comment 3

9 years ago
Created attachment 442130 [details] [diff] [review]
v1.1
Attachment #440677 - Attachment is obsolete: true
Attachment #442130 - Flags: review?(mconnor)
Attachment #442130 - Flags: review?(mconnor) → review+
(Assignee)

Comment 4

9 years ago
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
Last Resolved: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.3b3
(Assignee)

Updated

9 years ago
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.