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