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!
authorBenjamin Smedberg <benjamin@smedbergs.us>
Thu, 20 Jun 2013 15:20:14 -0400
changeset 147373 4fb8fa8668c5efe4eb7b046192bfe0559b6064f4
parent 147358 2ff16cbb28301b7c21cdb4b017067a346c15b4df
child 147374 208bb59549380f1a9a1fd2d7ceee14872320e03f
push id2697
push userbbajaj@mozilla.com
push dateMon, 05 Aug 2013 18:49:53 +0000
treeherdermozilla-beta@dfec938c7b63 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjohns
bugs882339
milestone24.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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!
dom/plugins/base/nsPluginTags.cpp
--- a/dom/plugins/base/nsPluginTags.cpp
+++ b/dom/plugins/base/nsPluginTags.cpp
@@ -327,24 +327,17 @@ nsPluginTag::GetDisabled(bool* aDisabled
 {
   *aDisabled = !IsEnabled();
   return NS_OK;
 }
 
 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
 nsPluginTag::GetBlocklisted(bool* aBlocklisted)
 {
   *aBlocklisted = IsBlocklisted();
   return NS_OK;
 }