Closed
Bug 816551
Opened 12 years ago
Closed 12 years ago
PluginHelper._getBindingType doesn't always return a value
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 20
People
(Reporter: kats, Assigned: kats)
References
Details
Attachments
(1 file)
1.16 KB,
patch
|
Margaret
:
review+
|
Details | Diff | Splinter Review |
Seen in logcat on Fennec startup: 11-29 19:18:17.028 E/GeckoConsole( 1697): [JavaScript Warning: "TypeError: anonymous function does not always return a value" {file: "chrome://browser/content/browser.js" line: 5920 column: 8 source: " return "PluginNotFound"; 11-29 19:18:17.028 E/GeckoConsole( 1697): "}] 11-29 19:18:17.028 E/GeckoConsole( 1697): [JavaScript Warning: "TypeError: anonymous function does not always return a value" {file: "chrome://browser/content/browser.js" line: 5922 column: 8 source: " return "PluginClickToPlay"; 11-29 19:18:17.028 E/GeckoConsole( 1697): "}] 11-29 19:18:17.036 E/GeckoConsole( 1697): [JavaScript Warning: "TypeError: anonymous function does not always return a value" {file: "chrome://browser/content/browser.js" line: 5924 column: 8 source: " return "PluginPlayPreview"; 11-29 19:18:17.036 E/GeckoConsole( 1697): "}] 11-29 19:18:17.036 E/GeckoConsole( 1697): [JavaScript Warning: "TypeError: anonymous function does not always return a value" {file: "chrome://browser/content/browser.js" line: 5927 column: 8 source: " return; 11-29 19:18:17.036 E/GeckoConsole( 1697): "}]
Comment 1•12 years ago
|
||
We can change _getBindingType to return an empty string where it currently returns nothing: http://mxr.mozilla.org/mozilla-central/source/mobile/android/chrome/content/browser.js#5934 Also, the warnings mention that this is an anonymous function. kats, I thought you said that the JS engine is smart enough now to give more useful messages for anonymous functions that are properties of objects. Is that just true for a different case?
Whiteboard: [mentor=margaret][lang=js]
Assignee | ||
Comment 2•12 years ago
|
||
(In reply to Margaret Leibovic [:margaret] from comment #1) > Also, the warnings mention that this is an anonymous function. kats, I > thought you said that the JS engine is smart enough now to give more useful > messages for anonymous functions that are properties of objects. Is that > just true for a different case? According to bug 805904, the JS engine can only infer names in some cases, unfortunately.
Comment 3•12 years ago
|
||
FWIW the desktop fix for this was to return null (see bug 814383). We should really factor this code out into a JS module reusable by both fennec and firefox...
Assignee | ||
Comment 4•12 years ago
|
||
Sorry, this is annoying me too much, and makes it harder to spot any other warnings that might crop up on startup.
Assignee: nobody → bugmail.mozilla
Whiteboard: [mentor=margaret][lang=js]
Assignee | ||
Comment 5•12 years ago
|
||
Attachment #691976 -
Flags: review?(margaret.leibovic)
Updated•12 years ago
|
Attachment #691976 -
Flags: review?(margaret.leibovic) → review+
Assignee | ||
Comment 6•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/fb65298e7117
Comment 7•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/fb65298e7117
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 20
Updated•3 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
•