Closed
Bug 735589
Opened 12 years ago
Closed 12 years ago
B2G SMS: ctypes undefined error in systemlib.js in xpcshell tests for SMS
Categories
(Core :: DOM: Device Interfaces, defect)
Tracking
()
RESOLVED
FIXED
mozilla14
People
(Reporter: vicamo, Assigned: vicamo)
References
Details
Attachments
(1 file, 1 obsolete file)
909 bytes,
patch
|
philikon
:
review+
|
Details | Diff | Splinter Review |
Attachement 604277 in bug 734299 breaks xpcshell tests with error "resource://gre/modules/systemlibs.js:101: ReferenceError: ctypes is not defined". In systemlibs.js line 20, the already existing libcutils returns a dummy on error catched, while libnetutils still try to create an working object for return at line 100. This error is found within x86_x64 b2g build.
Comment 1•12 years ago
|
||
The xpcshell test can easily import resource://gre/modules/ctypes.jsm and pass that into the worker scope.
Assignee | ||
Comment 2•12 years ago
|
||
verified with existing test scripts
Attachment #605819 -
Flags: review?(philipp)
Comment 3•12 years ago
|
||
Comment on attachment 605819 [details] [diff] [review] import ctyps.jsm Hmm, does this even work? The worker only sees 'worker_ns' created in 'newWorker()', no? I was thinking of importing it directly into the worker namespace, like so: function newWorker(custom_ns) { let worker_ns = { ... }; Cu.import("resource://gre/modules/ctypes.jsm", worker_ns); ... return worker_ns; } I think that's more elegant, too...
Attachment #605819 -
Flags: review?(philipp)
Assignee | ||
Comment 4•12 years ago
|
||
(In reply to Philipp von Weitershausen [:philikon] from comment #3) > Comment on attachment 605819 [details] [diff] [review] > import ctyps.jsm > > Hmm, does this even work? The worker only sees 'worker_ns' created in > 'newWorker()', no? Strange, but it does :) > I was thinking of importing it directly into the worker > namespace, like so: > > function newWorker(custom_ns) { > let worker_ns = { > ... > }; > Cu.import("resource://gre/modules/ctypes.jsm", worker_ns); > ... > return worker_ns; > } > > I think that's more elegant, too... Perfect!
Assignee | ||
Comment 5•12 years ago
|
||
Attachment #605819 -
Attachment is obsolete: true
Attachment #606075 -
Flags: review?(philipp)
Assignee | ||
Updated•12 years ago
|
Assignee: nobody → vyang
Updated•12 years ago
|
Attachment #606075 -
Flags: review?(philipp) → review+
Comment 6•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/29e6ffe61193
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla14
You need to log in
before you can comment on or make changes to this bug.
Description
•