Rewrite WeaveCrypto as a .jsm

RESOLVED FIXED in 1.6

Status

()

defect
RESOLVED FIXED
9 years ago
10 months ago

People

(Reporter: taras.mozilla, Assigned: philikon)

Tracking

unspecified
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [ts][qa-])

Attachments

(4 attachments, 1 obsolete attachment)

Having it as an xpcom component incurs needless overhead.
Whiteboard: [ts]
Should definitely do this, probably for 2.0 (?) when support for Firefox 3.6 and its binary WeaveCrypto component is dropped.
Target Milestone: --- → 2.0
2.0 is a planned add-on-based release around June (it might get renumbered).

Future for now, but definitely wanted in the Fx4 timeframe.
Target Milestone: 2.0 → Future
This is a pre requisite for bug 570619 (which already has a patch for it; I was unaware of this bug; will move patch over).
Assignee: nobody → philipp
Blocks: 570619
Target Milestone: Future → 1.6
This is pretty much what we had in bug 570619 already. Copying comment 6:

  For some reason this breaks one test (test_crypto_crypt.js) because it
  used an improper base64 string for the 'badiv' variable (trailing =);
  the failure origins from bug 439276. Making this a proper base64 string
  makes the tests pass but fail for the binary component.
Attachment #481747 - Flags: review?(mconnor)
Move add-on test harness to the 'addon' directory and make it reusable, in preparation of Part 3 where we move the WeaveCrypto related tests to services/crypto/
Attachment #481748 - Flags: review?(mconnor)
Posted patch Build fixes on m-c (obsolete) — Splinter Review
Attachment #482277 - Flags: review?(mconnor)
Comment on attachment 481747 [details] [diff] [review]
Part 1 (v1): Make WeaveCrypto.js a JSM


>-# WeaveCrypto.js
>+# IWeaveCrypto.xpt
> interfaces components/IWeaveCrypto.xpt
>-component {7fa20841-c90e-4432-a1a1-ba3b20cb6b37} components/WeaveCrypto.js
>-contract @labs.mozilla.com/Weave/Crypto;2 {7fa20841-c90e-4432-a1a1-ba3b20cb6b37}

If we're not using this in Gecko 2.0, do we need to register the xpt at all?  I don't see why we would, trunk doesn't have an impl, and we shouldn't hit this...
Attachment #481747 - Flags: review?(mconnor) → review+
Attachment #481748 - Flags: review?(mconnor) → review+
(In reply to comment #8)
> If we're not using this in Gecko 2.0, do we need to register the xpt at all?

We still refer to Ci.IWeaveCrypto in the code. But of course trunk comes with its own, already registered Ci.IWeaveCrypto. At least since 4.0b4. If we don't care about the add-on working on previous betas, then yes, we can get rid of this.
Attachment #481749 - Flags: review?(mconnor) → review+
Attachment #482277 - Flags: review?(mconnor) → review+
Part 1: http://hg.mozilla.org/services/fx-sync/rev/f62e573d9c35
Part 2: http://hg.mozilla.org/services/fx-sync/rev/cd0f2e5b5ea6
Part 3: http://hg.mozilla.org/services/fx-sync/rev/518f949b58d6

m-c build fixes will have to land together with the next merge (bug 603388)
Blocks: 603388
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Update build fixes patch to include test move.
Attachment #482277 - Attachment is obsolete: true
Whiteboard: [ts] → [ts][qa-]
Component: Firefox Sync: Crypto → Sync
Product: Cloud Services → Firefox
You need to log in before you can comment on or make changes to this bug.