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

Thue C.T. Nikolajsen thue at chokoladefarmen.dk
Fri Mar 20 08:43:03 PDT 2009


STOP SPAMMING ME FOR FUCKS SAKE!!!!!!!
----- Original Message ----- 
From: "Philip Chee" <philip at aleytys.pc.my>
Newsgroups: public.mozdev.project_owners
To: <project_owners at mozdev.org>
Sent: Monday, November 03, 2008 5:06 AM
Subject: [Project_owners] Problem with JSLib on trunk (Gecko 1.9.1)


> 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 =
> NS_ERROR_XPC_CANT_CONVERT_WN_TO_FUN
> 
> 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.
> 
> <https://developer.mozilla.org/En/NsIDOMFile>
> 
> 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
> JsLib.File()
> 
> Phil
> 
> -- 
> 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
> 
> _______________________________________________
> Project_owners mailing list
> Project_owners at mozdev.org
> https://www.mozdev.org/mailman/listinfo/project_owners


More information about the Project_owners mailing list