Closed
Bug 809666
Opened 12 years ago
Closed 12 years ago
Cu.import("resource:///modules/ctypes.jsm").ctypes is undefined when jsloader.reuseGlobal = true
Categories
(Core :: js-ctypes, defect)
Tracking
()
People
(Reporter: philikon, Assigned: khuey)
References
Details
Attachments
(1 file)
(deleted),
patch
|
mrbkap
:
review+
|
Details | Diff | Splinter Review |
In B2G, we have set jsloader.reuseGlobal = true which means all JSMs are executed in a function scope using a shared global (see bug 798491). In this scenario, Cu.import()ing ctypes.jsm no longer exports the 'ctypes' symbol. Cu.import("resource:///modules/ctypes.jsm").ctypes is undefined. I suspect this is because the initializer [1] that scribbles the 'ctypes' object into the JSM scope explicitly gets the global, not the function scope. Maybe the helper proposed in bug 807845 could help here?
[1] https://mxr.mozilla.org/mozilla-central/source/toolkit/components/ctypes/ctypes.jsm#21
[2] https://mxr.mozilla.org/mozilla-central/source/toolkit/components/ctypes/ctypes.cpp#121
Assignee | ||
Comment 1•12 years ago
|
||
Correct on all counts.
Assignee | ||
Comment 2•12 years ago
|
||
We have to make the same changes to toolkit/components/perf too.
Assignee | ||
Updated•12 years ago
|
Assignee: nobody → khuey
Reporter | ||
Comment 4•12 years ago
|
||
Nom'ing for basecampl. This blocks running the RIL xpcshell tests (they are not enabled yet on the infra, but developers are encouraged to run them to hunt down regressions.)
blocking-basecamp: --- → ?
Updated•12 years ago
|
blocking-basecamp: ? → +
Assignee | ||
Comment 5•12 years ago
|
||
Attachment #680707 -
Flags: review?(mrbkap)
Updated•12 years ago
|
Attachment #680707 -
Flags: review?(mrbkap) → review+
Assignee | ||
Comment 6•12 years ago
|
||
Comment 7•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
Comment 8•12 years ago
|
||
status-firefox18:
--- → fixed
status-firefox19:
--- → fixed
Comment 9•12 years ago
|
||
Unfortunately, this fails to build on Aurora. Backed out.
https://hg.mozilla.org/releases/mozilla-aurora/rev/133dfa6f8039
https://tbpl.mozilla.org/php/getParsedLog.php?id=17009985&tree=Mozilla-Aurora
ctypes.cpp
e:/builds/moz2_slave/m-aurora-w32/build/toolkit/components/ctypes/ctypes.cpp(126) : error C2039: 'Get' : is not a member of 'mozJSComponentLoader'
e:\builds\moz2_slave\m-aurora-w32\build\js\xpconnect\loader\mozJSComponentLoader.h(37) : see declaration of 'mozJSComponentLoader'
e:/builds/moz2_slave/m-aurora-w32/build/toolkit/components/ctypes/ctypes.cpp(126) : error C3861: 'Get': identifier not found
e:/builds/moz2_slave/m-aurora-w32/build/toolkit/components/ctypes/ctypes.cpp(127) : error C2039: 'FindTargetObject' : is not a member of 'mozJSComponentLoader'
e:\builds\moz2_slave\m-aurora-w32\build\js\xpconnect\loader\mozJSComponentLoader.h(37) : see declaration of 'mozJSComponentLoader'
Assignee | ||
Comment 10•12 years ago
|
||
https://hg.mozilla.org/releases/mozilla-aurora/rev/341b2b3db621
It needed the patch in Bug 810987.
Comment 11•12 years ago
|
||
+ bool reusingGlobal = Preferences::GetBool("jsloader.reuseGlobal");
Where is this variable used?
Comment 12•12 years ago
|
||
(In reply to Masatoshi Kimura [:emk] from comment #11)
> + bool reusingGlobal = Preferences::GetBool("jsloader.reuseGlobal");
> Where is this variable used?
(It's not. I filed bug 825467 w/ a patch to drop it.)
You need to log in
before you can comment on or make changes to this bug.
Description
•