Bug 820623 - Javascript warning on fennec startup (NativeWindow.menu.add) r=kats
authorMark Finkle <mfinkle@mozilla.com>
Thu, 13 Dec 2012 13:06:05 -0500
changeset 115953 1b3ec53cab896c46cae054fa079aa7e97b1fa862
parent 115952 ab25a9cef1c871b92e7f5dde8fed7f483c774100
child 115954 d468da47eef0f7f8065710788df3e9203e71ed3f
push id24034
push useremorley@mozilla.com
push dateFri, 14 Dec 2012 15:28:57 +0000
treeherdermozilla-central@50d8f411d305 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskats
bugs820623
milestone20.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
Bug 820623 - Javascript warning on fennec startup (NativeWindow.menu.add) r=kats
mobile/android/chrome/content/browser.js
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -1213,17 +1213,17 @@ var NativeWindow = {
         options = arguments[0];
       } else if (arguments.length == 3) {
           options = {
             name: arguments[0],
             icon: arguments[1],
             callback: arguments[2]
           };
       } else {
-         return;
+         throw "Incorrect number of parameters";
       }
 
       options.type = "Menu:Add";
       options.id = this._menuId;
 
       sendMessageToJava({ gecko: options });
       this._callbacks[this._menuId] = options.callback;
       this._menuId++;