Bug 806472 - NS_CONTENT_PERMISSION_PROMPT_CONTRACTID is used both as a service and an instance. r=bent

This commit is contained in:
Doug Turner 2012-10-31 10:06:42 -07:00
parent 98dca1be83
commit 4ee2adc832
4 changed files with 5 additions and 5 deletions

View File

@ -31,7 +31,7 @@ nsContentPermissionRequestProxy::Init(const nsACString & type,
mParent = parent; mParent = parent;
mType = type; mType = type;
nsCOMPtr<nsIContentPermissionPrompt> prompt = do_GetService(NS_CONTENT_PERMISSION_PROMPT_CONTRACTID); nsCOMPtr<nsIContentPermissionPrompt> prompt = do_CreateInstance(NS_CONTENT_PERMISSION_PROMPT_CONTRACTID);
if (!prompt) { if (!prompt) {
return NS_ERROR_FAILURE; return NS_ERROR_FAILURE;
} }

View File

@ -1462,7 +1462,7 @@ public:
return NS_OK; return NS_OK;
} }
nsCOMPtr<nsIContentPermissionPrompt> prompt = do_GetService(NS_CONTENT_PERMISSION_PROMPT_CONTRACTID); nsCOMPtr<nsIContentPermissionPrompt> prompt = do_CreateInstance(NS_CONTENT_PERMISSION_PROMPT_CONTRACTID);
if (prompt) { if (prompt) {
prompt->Prompt(this); prompt->Prompt(this);
} }
@ -2049,7 +2049,7 @@ nsDOMDeviceStorage::EnumerateInternal(const JS::Value & aName,
return NS_OK; return NS_OK;
} }
nsCOMPtr<nsIContentPermissionPrompt> prompt = do_GetService(NS_CONTENT_PERMISSION_PROMPT_CONTRACTID); nsCOMPtr<nsIContentPermissionPrompt> prompt = do_CreateInstance(NS_CONTENT_PERMISSION_PROMPT_CONTRACTID);
if (prompt) { if (prompt) {
prompt->Prompt(r); prompt->Prompt(r);
} }

View File

@ -79,7 +79,7 @@ public:
} }
NS_IMETHOD Run() { NS_IMETHOD Run() {
nsCOMPtr<nsIContentPermissionPrompt> prompt = do_GetService(NS_CONTENT_PERMISSION_PROMPT_CONTRACTID); nsCOMPtr<nsIContentPermissionPrompt> prompt = do_CreateInstance(NS_CONTENT_PERMISSION_PROMPT_CONTRACTID);
if (prompt) { if (prompt) {
prompt->Prompt(mRequest); prompt->Prompt(mRequest);
} }

View File

@ -128,7 +128,7 @@ class nsDesktopNotificationRequest : public nsIContentPermissionRequest,
NS_IMETHOD Run() NS_IMETHOD Run()
{ {
nsCOMPtr<nsIContentPermissionPrompt> prompt = nsCOMPtr<nsIContentPermissionPrompt> prompt =
do_GetService(NS_CONTENT_PERMISSION_PROMPT_CONTRACTID); do_CreateInstance(NS_CONTENT_PERMISSION_PROMPT_CONTRACTID);
if (prompt) { if (prompt) {
prompt->Prompt(this); prompt->Prompt(this);
} }