Boris Zbarsky wrote:
> Michael Vincent van Rantwijk, MultiZilla wrote:
>> Yeah, I already looked at it, and I think that this JS equivalent is
>> what it does (hopefully) right?
>>
>> const Cc = Components.classes;
>> const Ci = Components.interfaces;
>> var secMan =
>> Cc["@mozilla.org/scriptsecuritymanager;1"].getService(Ci.nsIScriptSecurityManager);
>>
>>
>> channel.owner = secMan.getCodebasePrincipal(aURI);
>
> Looks right, yes.
>
> -Boris
I should have checked why 'getCodebasePrincipal' returned as 'undefined'
in SeaMonkey v1.1.4 (I guess I was too tired/sleepy already yesterday)
which is just because of bug 383783 [1] and thus I'll add a check like
this for now:
if (Ci.nsIScriptSecurityManager.number ==
"{0b8a9b32-713f-4c39-bea0-6cacec46f385}") {
because that will work for me (too bad for v1.1 monikers).
[1] https://bugzilla.mozilla.org/show_bug.cgi?id=383783
Thanks,
--
Michael Vincent van Rantwijk
- MultiZilla Project Team Lead
- XUL Boot Camp Staff member (ActiveState Training Partner)
- iPhone Application Developer
_______________________________________________
dev-tech-network mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-network