Bug 235261 - Use getService instead of createInstance for prompt service.

Patch by timeless@bemail.org.
r=silver@warwickcompsoc.co.uk
This commit is contained in:
silver%warwickcompsoc.co.uk 2004-03-09 23:34:18 +00:00
Родитель 541ed494f3
Коммит 7e27c23fe2
1 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -864,7 +864,7 @@ function alert(msg, parent, title)
{
var PROMPT_CTRID = "@mozilla.org/embedcomp/prompt-service;1";
var nsIPromptService = Components.interfaces.nsIPromptService;
var ps = Components.classes[PROMPT_CTRID].createInstance(nsIPromptService);
var ps = Components.classes[PROMPT_CTRID].getService(nsIPromptService);
if (!parent)
parent = window;
if (!title)
@ -876,7 +876,7 @@ function confirm(msg, parent, title)
{
var PROMPT_CTRID = "@mozilla.org/embedcomp/prompt-service;1";
var nsIPromptService = Components.interfaces.nsIPromptService;
var ps = Components.classes[PROMPT_CTRID].createInstance(nsIPromptService);
var ps = Components.classes[PROMPT_CTRID].getService(nsIPromptService);
if (!parent)
parent = window;
if (!title)
@ -888,7 +888,7 @@ function prompt(msg, initial, parent, title)
{
var PROMPT_CTRID = "@mozilla.org/embedcomp/prompt-service;1";
var nsIPromptService = Components.interfaces.nsIPromptService;
var ps = Components.classes[PROMPT_CTRID].createInstance(nsIPromptService);
var ps = Components.classes[PROMPT_CTRID].getService(nsIPromptService);
if (!parent)
parent = window;
if (!title)
@ -905,7 +905,7 @@ function promptPassword(msg, initial, parent, title)
{
var PROMPT_CTRID = "@mozilla.org/embedcomp/prompt-service;1";
var nsIPromptService = Components.interfaces.nsIPromptService;
var ps = Components.classes[PROMPT_CTRID].createInstance(nsIPromptService);
var ps = Components.classes[PROMPT_CTRID].getService(nsIPromptService);
if (!parent)
parent = window;
if (!title)