Closed
Bug 561480
Opened 14 years ago
Closed 14 years ago
Errors when loading WeaveCrypto.js on older platforms
Categories
(Firefox :: Sync, defect)
Firefox
Sync
Tracking
()
RESOLVED
FIXED
1.3b4
People
(Reporter: Dolske, Assigned: Mardak)
References
Details
Attachments
(1 file, 1 obsolete file)
1.55 KB,
patch
|
mconnor
:
review+
|
Details | Diff | Splinter Review |
Until we transition over entirely to the js-ctypes flavor of WeaveCrypto, Weave will currently load both the binary and WeaveCrypto.js components, and pick between them at runtime. This works fine, except that on pre-1.9.3 platforms this causes some harmless (?) error console noise, because WeaveCrypto.js can't import Services.jsm and jsctypes.jsm, which are new in 1.9.3. This patch defers loading these modules until after a platform version check.
Attachment #441183 -
Flags: review?(mconnor)
Assignee | ||
Comment 1•14 years ago
|
||
So this will leave a registered component that does nothing? Or it'll fail to do stuff when its interfaces are poked?
Assignee | ||
Comment 2•14 years ago
|
||
Hrm yeah, Components.classes["@labs.mozilla.com/Weave/Crypto;2"].getService(Components.interfaces.IWeaveCrypto).generateRandomIV() Error: uncaught exception: [Exception... "'[JavaScript Error: "Services is not defined" {file: "file:///Users/Ed/weave/dist/stage/components/WeaveCrypto.js" line: 109}]' when calling method: [IWeaveCrypto::generateRandomIV]"
Assignee | ||
Comment 3•14 years ago
|
||
Yeah, perhaps component = [WeaveCrypto] should just be [] if something fails.
Reporter | ||
Comment 4•14 years ago
|
||
It's a component that only works on 1.9.3, no one should be invoking it on 1.9.2. This is just an interm fix until Weave only supports 1.9.3+, at which point it can be reverted.
Assignee | ||
Comment 5•14 years ago
|
||
Bug 561005 was going to check for existence of ;2 and load ;1 instead of doing the appinfo lookup everywhere. let components = []; try { Cu.import(..) components.push(WeaveCrypto); } catch(ex) {} ?
Assignee | ||
Updated•14 years ago
|
Summary: Defer loading jsctypes.jsm and Services.jsm to hush errors on older platforms → Errors when loading WeaveCrypto.js on older platforms
Assignee | ||
Comment 6•14 years ago
|
||
Reporter | ||
Updated•14 years ago
|
Attachment #441183 -
Attachment is obsolete: true
Attachment #441183 -
Flags: review?(mconnor)
Updated•14 years ago
|
Attachment #443227 -
Flags: review?(mconnor) → review+
Assignee | ||
Comment 7•14 years ago
|
||
http://hg.mozilla.org/labs/weave/rev/9396b591a8db Only register WeaveCrypto if it was able to import scripts.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.3b4
Updated•6 years ago
|
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.
Description
•