Browse Source

permissions: hackfix CPermission::del() to give out nsIURI instead of const char* as "Bug 1170200 - Part 1: Change the API for nsIPermissionManager::Remove() to accept a URI instead of a string; r=ehsan" is landed in platform tree

master
roytam1 8 months ago
parent
commit
036b2296bd
  1. 13
      k-meleon/app/Permissions.h

13
k-meleon/app/Permissions.h

@ -98,7 +98,18 @@ public:
{
nsresult rv;
rv = m_permissionManager->Remove(permission->m_host, m_type);
nsCString nsurl;
nsurl = permission->m_host;
// http is needed to make an nsIURI
if (!strstr(permission->m_host.get(), "http://"))
nsurl.Insert("http://", 0);
nsCOMPtr<nsIURI> uri;
rv = NewURI(getter_AddRefs(uri), nsurl);
NS_ENSURE_SUCCESS(rv, FALSE);
rv = m_permissionManager->Remove(uri, m_type);
NS_ENSURE_SUCCESS(rv, FALSE);
return TRUE;
}

Loading…
Cancel
Save