Bug 893774 - Allow passing of `null' for aButtons param in doorhanger.show. r=mleibovic

This commit is contained in:
Stefan Sobering 2013-11-06 00:24:18 -06:00
parent 092eb74ddd
commit 8b52db17b7

View File

@ -1717,6 +1717,10 @@ var NativeWindow = {
* the checked state as an argument.
*/
show: function(aMessage, aValue, aButtons, aTabID, aOptions) {
if (aButtons == null) {
aButtons = [];
}
aButtons.forEach((function(aButton) {
this._callbacks[this._callbacksId] = { cb: aButton.callback, prompt: this._promptId };
aButton.callback = this._callbacksId;