Bug 882339 part B - nsPluginTag::IsBlocklisted should use the cached blocklist state, since it gets called in some tight loops via plugintag.IsActive r=johns Once more with feeling!

--HG--
extra : rebase_source : 50342011c886109a25a7a38d18b23cde7c4e4c85
This commit is contained in:
Benjamin Smedberg 2013-06-20 15:20:14 -04:00
parent 2b500df8aa
commit 53169fb9e6

View File

@ -332,14 +332,7 @@ nsPluginTag::GetDisabled(bool* aDisabled)
bool
nsPluginTag::IsBlocklisted()
{
nsCOMPtr<nsIBlocklistService> bls = do_GetService("@mozilla.org/extensions/blocklist;1");
if (!bls) {
return false;
}
uint32_t state = nsIBlocklistService::STATE_NOT_BLOCKED;
bls->GetPluginBlocklistState(this, EmptyString(), EmptyString(), &state);
return state == nsIBlocklistService::STATE_BLOCKED;
return GetBlocklistState() == nsIBlocklistService::STATE_BLOCKED;
}
NS_IMETHODIMP