JS warnings in toolkit/loader.js: function resolveURI, function startup do not always return a value

RESOLVED FIXED

Status

Add-on SDK
General
P3
normal
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: Irving, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

When installing an Add-on SDK restartless add-on:

System JS : WARNING resource://gre/modules/XPIProvider.jsm -> jar:file:///Users/ireid/Library/Application%20Support/Firefox/Profiles/sngia9xd.debug/extensions/jid1-6WBY0OQBNnIolw@jetpack.xpi!/bootstrap.js -> resource://gre/modules/commonjs/toolkit/loader.js:318
                     function resolveURI does not always return a value
System JS : WARNING resource://gre/modules/XPIProvider.jsm -> jar:file:///Users/ireid/Library/Application%20Support/Firefox/Profiles/sngia9xd.debug/extensions/jid1-6WBY0OQBNnIolw@jetpack.xpi!/bootstrap.js -> resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/addon/runner.js:80
                     function startup does not always return a value

Updated

5 years ago
Priority: -- → P3
The github / bugzilla extension is getting 500 errors for some reason ( maybe bit-rotted? ) so here's a pull request:

https://github.com/mozilla/addon-sdk/pull/1235

Open question: is returning 'void 0' the right thing to do?
Created attachment 800358 [details] [diff] [review]
bug_910304.diff

Proposed patch, tests pass.
Attachment #800358 - Flags: review?(rFobic)
Comment on attachment 800358 [details] [diff] [review]
bug_910304.diff

I don't mind this patch, although note that this warnings only show up if `javascript.options.strict` preference is set to `true` which is not default.

I also expect to see a lot more warnings from SDK code if that pref is set &
I'm not really convinced that addressing all of them is worth it since it only
makes code more confusing.
Attachment #800358 - Flags: review?(rFobic) → review+

Comment 4

5 years ago
Commits pushed to master at https://github.com/mozilla/addon-sdk

https://github.com/mozilla/addon-sdk/commit/e834af29a33364810fe0457d42c9b4ede420d40d
fixes bug 910304 where we see warnings that these functions do not always return a value.

https://github.com/mozilla/addon-sdk/commit/5f752f01a2cedcb27f63496419a8124fe1563d3a
Merge pull request #1235 from canuckistani/bug_910304_func_return_values

Fixes Bug 910304 where we see warnings that these functions do not always return a value. r=@gozala

Updated

5 years ago
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Depends on: 923719
You need to log in before you can comment on or make changes to this bug.