mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 854340 - Firefox for Android cannot against loop + alert attack r=wesj
This commit is contained in:
parent
3b054d3f86
commit
cfb0ef1a0f
@ -127,8 +127,12 @@ Prompt.prototype = {
|
||||
if (aCheckMsg)
|
||||
aInputs.push({ type: "checkbox", label: PromptUtils.cleanUpLabel(aCheckMsg), checked: aCheckState.value });
|
||||
|
||||
if (this._domWin)
|
||||
let callerWin;
|
||||
if (this._domWin) {
|
||||
PromptUtils.fireDialogEvent(this._domWin, "DOMWillOpenModalDialog");
|
||||
let winUtils = this._domWin.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils);
|
||||
callerWin = winUtils.enterModalStateWithWindow();
|
||||
}
|
||||
|
||||
let msg = { type: "Prompt:Show" };
|
||||
if (aTitle) msg.title = aTitle;
|
||||
@ -138,7 +142,16 @@ Prompt.prototype = {
|
||||
PromptUtils.getLocaleString("Cancel")
|
||||
];
|
||||
msg.inputs = aInputs;
|
||||
return PromptUtils.sendMessageToJava(msg);
|
||||
|
||||
let retval = PromptUtils.sendMessageToJava(msg);
|
||||
|
||||
if (this._domWin) {
|
||||
let winUtils = this._domWin.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils);
|
||||
winUtils.leaveModalStateWithWindow(callerWin);
|
||||
PromptUtils.fireDialogEvent(this._domWin, "DOMModalDialogClosed");
|
||||
}
|
||||
|
||||
return retval;
|
||||
},
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user