Bug 235262 The PromptService is a service and should be accessed through getService instead of createInstance

r=rginda sr=dveditz
This commit is contained in:
timeless%mozdev.org 2004-04-14 05:09:04 +00:00
parent 69baa18916
commit 38de273810

View File

@ -227,7 +227,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)
@ -239,7 +239,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)
@ -251,7 +251,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)