char *principalID = getStringArgument(cx, obj, 0, argc, argv);
nsCAutoString principalFingerprint; getUTF8StringArgument(cx, obj, 0, argc, argv, principalFingerprint);
netscape_security_setCanEnablePrivilege(JSContext *cx, JSObject *obj, uintN argc,                                        jsval *argv, jsval *rval){    if (argc < 2) return JS_FALSE;    char *principalID = getStringArgument(cx, obj, 0, argc, argv);    char *cap = getStringArgument(cx, obj, 1, argc, argv);    if (!principalID || !cap)        return JS_FALSE;    nsresult rv;    nsCOMPtr<nsIScriptSecurityManager> securityManager =              do_GetService(NS_SCRIPTSECURITYMANAGER_CONTRACTID, &rv);    if (NS_FAILED(rv))         return JS_FALSE;    //    NS_ASSERTION(cx == GetCurrentContext(), "unexpected context");    rv = securityManager->SetCanEnableCapability(principalID, cap,                                                  nsIPrincipal::ENABLE_GRANTED);    if (NS_FAILED(rv))        return JS_FALSE;    return JS_TRUE;}