mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
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:
parent
69baa18916
commit
38de273810
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user