author | dlim <daniel9618@gmail.com> |
Tue, 23 Feb 2016 13:45:36 -0800 | |
changeset 285309 | e38a16b7d37e848ace544aa45c8ccebb3d0411c5 |
parent 285308 | e0cc363043ade8f69a600bfd68edaf88b35b7c96 |
child 285310 | 0ed2152fd50bd4655adf35c77e26ab64c15181a1 |
push id | 30029 |
push user | cbook@mozilla.com |
push date | Thu, 25 Feb 2016 10:53:34 +0000 |
treeherder | mozilla-central@ad029c4e30b0 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | nalexander |
bugs | 1225563 |
milestone | 47.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/mobile/android/chrome/content/browser.js +++ b/mobile/android/chrome/content/browser.js @@ -2278,16 +2278,21 @@ var NativeWindow = { * @param aCategory * Doorhanger type to display (e.g., LOGIN) */ show: function(aMessage, aValue, aButtons, aTabID, aOptions, aCategory) { if (aButtons == null) { aButtons = []; } + if (aButtons.length > 2) { + console.log("Doorhanger can have a maximum of two buttons!"); + aButtons.length = 2; + } + aButtons.forEach((function(aButton) { this._callbacks[this._callbacksId] = { cb: aButton.callback, prompt: this._promptId }; aButton.callback = this._callbacksId; this._callbacksId++; }).bind(this)); this._promptId++; let json = {