[Project_owners] Problem with JSLib on trunk (Gecko 1.9.1)

Philip Chee philip at aleytys.pc.my
Sun Nov 2 20:06:22 PST 2008

On trunk the following code doesn't work:

var du = new DirUtils();
var f = new File(du.getPrefsDir());

The second line causes the error:

Error: Cannot convert WrappedNative to function =

Looking at the properties of File.prototype I get:

Properties for object:
[xpconnect wrapped native prototype]

getAsText: function getAsText() {
    [native code]
getAsDataURL: function getAsDataURL() {
    [native code]
getAsBinary: function getAsBinary() {
    [native code]

This doesn't look like the jslib File() object at all. Looking through
DevMo I see that nsIDOMFile was added in Firefox 3. So it seems we have
a namespace clash.


Unfortunately the extension I'm trying to update (Cookie Panel) is
orphaned, so I don't know what to do. On the JSLib side I guess you
could rename their File() object to JslibFile() or namespace it to


Philip Chee <philip at aleytys.pc.my>, <philip.chee at gmail.com>
http://flashblock.mozdev.org/ http://xsidebar.mozdev.org
Guard us from the she-wolf and the wolf, and guard us from the thief,
oh Night, and so be good for us to pass.
[ ]And I thought *I* had problems!
* TagZilla 0.066.6

More information about the Project_owners mailing list