My Firefox extension is broken in Firefox 22.0. My extension contains a Mac OS X dynamic library which uses js-ctypes. When my extension loads, the Error Console says
Error: couldn’t open library:
/Users/jk/Library/Application Support/Firefox/Profiles/liejtghrj.Me/extensions/
firefoxe...@sheepsystems.com/components/SSYFirefoxCTypes.dylib
The extension loads but, of course, the IPC which my dylib provides doesn't work.
If I quit Firefox 22.0 and launch Firefox 21 in this profile, it works fine. Aurora 23.0a2 also fails. An earlier version of my extension also fails with Firefox >= 22.0. The problem is definitely due to a change in Firefox 22.0.
I’ve read through the Firefox 22 Release Notes and Firefox 22 for Developers but didn’t find any news on js-ctypes or dynamic libraries. I don’t see anything new in the ctpyes documentation either,
https://developer.mozilla.org/en-US/docs/Mozilla/js-ctypes/js-ctypes_reference/ctypes
This doc says it was last updated a year ago, mid-May 2012.
Here is the code in my “overlay” .js file that is failing The first three lines just get the path to my dylib…
Components.utils.import(“resource://gre/modules/ctypes.jsm”)
var profileDir = Components.classes["@
mozilla.org/file/directory_service;1"].getService(Components.interfaces.nsIProperties).get(“ProfD”, Components.interfaces.nsIFile).path ;
var cTypesDylibPath = profileDir + “/extensions/
firefoxe...@sheepsystems.com/components/SSYFirefoxCTypes.dylib” ;
var ssyFirefoxCTypes = ctypes.open(cTypesDylibPath) ;
The first three lines are obviously OK because the path which "couldn't open" printed in the Error Console is correct.
So it looks to me like a serious new bug in ctypes.open().
Am I the first person to discover this?
Unless someone tells me otherwise I'll file a bug and hope this can get fixed before Firefox 22 goes to production next month.
Thank you,
Jerry Krinock