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