зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
810bb86517
Коммит
b7f63674b1
|
@ -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)
|
||||
|
|
Загрузка…
Ссылка в новой задаче