Bug 1186582 - AskPermission should check for prompt exceptions; r=fabrice

This commit is contained in:
Kyle Machulis 2015-07-22 12:46:45 -07:00
parent a38ee65e1c
commit 9818c59749

View File

@ -372,7 +372,9 @@ nsContentPermissionUtils::AskPermission(nsIContentPermissionRequest* aRequest, n
nsCOMPtr<nsIContentPermissionPrompt> prompt =
do_GetService(NS_CONTENT_PERMISSION_PROMPT_CONTRACTID);
if (prompt) {
prompt->Prompt(aRequest);
if (NS_FAILED(prompt->Prompt(aRequest))) {
return NS_ERROR_FAILURE;
}
}
return NS_OK;
}