Closed Bug 1563474 Opened 5 years ago Closed 5 years ago

SyntaxTreesPool.getScriptInfo is unused

Categories

(DevTools :: General, task, P3)

task

Tracking

(firefox70 fixed)

RESOLVED FIXED
Firefox 70
Tracking Status
firefox70 --- fixed

People

(Reporter: standard8, Assigned: jdescottes)

References

Details

Attachments

(1 file)

SyntaxTreesPool.getScriptInfo looks to be unused:

https://searchfox.org/mozilla-central/rev/0671407b7b9e3ec1ba96676758b33316f26887a4/devtools/shared/Parser.jsm#180-194

https://searchfox.org/mozilla-central/search?q=getScriptInfo&redirect=false

We noticed this as we were investigating it as it appears to have the potential to return a length property that has value -1 which may be unexpected.

The priority flag is not set for this bug.
:pbro, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(pbrosset)

Julian, Mercurial tells me you are one of the persons who touched this file the most. Do you know where this file is used and why, and whether getScriptInfo can safely be removed?

Type: defect → task
Flags: needinfo?(pbrosset) → needinfo?(jdescottes)
Priority: -- → P3

I can't see any usage of most of the methods in Parser.jsm either!

Code coverage seems to confirm this.
https://codecov.io/gh/mozilla/gecko-dev/src/master/devtools/shared/Parser.jsm

The function (and file) was added 6 years ago in Bug 762160, but it seems that even then the method was not used.
So I am worried I am missing something.

Since the file seems mostly used for console evaluation (https://searchfox.org/mozilla-central/search?q=Parser.jsm&case=false&regexp=false&path=devtools) maybe :nchevobbe knows more?

Flags: needinfo?(jdescottes) → needinfo?(nchevobbe)

From what I know, and what I've working on, I don't think this is used.
Searching through code seems to validate that.

Flags: needinfo?(nchevobbe)
Assignee: nobody → jdescottes
Status: NEW → ASSIGNED
Pushed by jdescottes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c5a40696f0b6
Remove unused getScriptInfo from Parser.jsm r=nchevobbe
Blocks: 1568823
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 70
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: