Closed
Bug 820623
Opened 13 years ago
Closed 13 years ago
Javascript warning on fennec startup (NativeWindow.menu.add)
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 20
People
(Reporter: kats, Assigned: mfinkle)
References
Details
Attachments
(1 file)
813 bytes,
patch
|
kats
:
review+
|
Details | Diff | Splinter Review |
12-11 18:51:43.166 E/GeckoConsole(14235): [JavaScript Warning: "TypeError: anonymous function does not always return a value" {file: "chrome://browser/content/browser.js" line: 1208 column: 6 source: " return this._menuId - 1;
NativeWindow.menu.add has two return statements; one of which returns a value and the other does not.
Assignee | ||
Comment 1•13 years ago
|
||
Instead of returning nothing, we should throw an exception.
Assignee | ||
Comment 2•13 years ago
|
||
Replace the "return" with a "throw"
Assignee: nobody → mark.finkle
Attachment #691189 -
Flags: review?(bugmail.mozilla)
Reporter | ||
Comment 3•13 years ago
|
||
Comment on attachment 691189 [details] [diff] [review]
patch
Review of attachment 691189 [details] [diff] [review]:
-----------------------------------------------------------------
r=me with the typo fixed
::: mobile/android/chrome/content/browser.js
@@ +1199,5 @@
> icon: arguments[1],
> callback: arguments[2]
> };
> } else {
> + Throw "Incorrect number of parameters";
Lowercase the 't' in throw. I believe it's case-sensitive.
Attachment #691189 -
Flags: review?(bugmail.mozilla) → review+
Assignee | ||
Comment 4•13 years ago
|
||
Comment 5•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 20
Updated•5 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•