зеркало из https://github.com/mozilla/gecko-dev.git
Bug 594350 - Allow remoting of confirmEx et al. [r=mfinkle]
This commit is contained in:
Родитель
c23b38c4f8
Коммит
c3a90e3e4d
|
@ -60,12 +60,11 @@ function PromptService() {
|
||||||
case "Prompt:Call":
|
case "Prompt:Call":
|
||||||
// List of methods we remote - to check against malicious data.
|
// List of methods we remote - to check against malicious data.
|
||||||
// For example, it would be dangerous to allow content to show
|
// For example, it would be dangerous to allow content to show
|
||||||
// auth prompts. We allow only the methods that web content
|
// auth prompts.
|
||||||
// is allowed to show.
|
const ALL_METHODS = ["alert", "alertCheck", "confirm", "prompt", "confirmEx", "confirmCheck", "select"];
|
||||||
const ALL_METHODS = ['alert', 'confirm', 'prompt'];
|
|
||||||
var method = aMessage.json.method;
|
var method = aMessage.json.method;
|
||||||
if (ALL_METHODS.indexOf(method) == -1)
|
if (ALL_METHODS.indexOf(method) == -1)
|
||||||
throw 'PromptServiceRemoter received an invalid method';
|
throw "PromptServiceRemoter received an invalid method "+method;
|
||||||
var arguments = aMessage.json.arguments;
|
var arguments = aMessage.json.arguments;
|
||||||
arguments.unshift(null); // No need for window, child is already on top
|
arguments.unshift(null); // No need for window, child is already on top
|
||||||
// (see mobile browser's PromptService.js)
|
// (see mobile browser's PromptService.js)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче