Closed Bug 1155846 Opened 10 years ago Closed 10 years ago

Intentionally unreachable code in Prefetcher.jsm.

Categories

(Firefox :: Extension Compatibility, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 40
Tracking Status
firefox40 --- fixed

People

(Reporter: arai, Assigned: arai)

References

Details

Attachments

(1 file)

I'm going to add warning for unreachable code after return statement in bug 1151931, and it hits following code. https://dxr.mozilla.org/mozilla-central/source/toolkit/components/addoncompat/Prefetcher.jsm#104 > function log(...args) > { > return; > > for (let arg of args) { > dump(arg); > dump(" "); > } > dump("\n"); > } https://dxr.mozilla.org/mozilla-central/source/toolkit/components/addoncompat/Prefetcher.jsm#115 > function logPrefetch(kind, value1, component, value2) > { > return; > log("prefetching", kind, objAddr(value1) + "." + component, "=", objAddr(value2)); > } can we comment out those function body, instead of placing `return`? (it might be better to also comment out rest parameter, to improve performance)
Just commented out body and parameters. if there is better solution, let me know :)
Assignee: nobody → arai.unmht
Attachment #8594148 - Flags: review?(wmccloskey)
Comment on attachment 8594148 [details] [diff] [review] Comment out intentionally unreachable code and unused parameters in Prefetcher.jsm. Review of attachment 8594148 [details] [diff] [review]: ----------------------------------------------------------------- I guess this is okay, although I think the warning is a bad idea.
Attachment #8594148 - Flags: review?(wmccloskey) → review+
do you think the warning should be behind javascript.options.strict option, or shouldn't be added at all?
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 40
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: