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 125055 1b3ec53cab896c46cae054fa079aa7e97b1fa862
parent 125054 ab25a9cef1c871b92e7f5dde8fed7f483c774100
child 125056 d468da47eef0f7f8065710788df3e9203e71ed3f
push id2151
push userlsblakk@mozilla.com
push dateTue, 19 Feb 2013 18:06:57 +0000
treeherdermozilla-beta@4952e88741ec [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++;