Closed Bug 1809051 Opened 2 years ago Closed 2 years ago

Browser.getVersion should return the current and not a hardcoded JavaScript version

Categories

(Remote Protocol :: CDP, defect)

Firefox 110
defect

Tracking

(firefox110 fixed)

RESOLVED FIXED
110 Branch
Tracking Status
firefox110 --- fixed

People

(Reporter: canadahonk, Assigned: canadahonk, Mentored)

References

Details

(Whiteboard: [lang=js])

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36

Steps to reproduce:

When using CDP with --remote-debugging-port, Browser.getVersion reports jsEngine "1.8.5", a very (~11 year old) SpiderMonkey version which is hardcoded here: https://hg.mozilla.org/mozilla-central/file/tip/remote/cdp/domains/parent/Browser.sys.mjs#l22

Actual results:

jsEngine reports "1.8.5".

Expected results:

It should report the actual SpiderMonkey/JS engine version in use.

I think this could be related to Bug 1549421.

Component: Untriaged → CDP
Product: Firefox → Remote Protocol

Thank you for the report Rares! Would you actually be interested to get this fixed? You already had a good start with finding the appropriate code, so adding a fix and a test shouldn't be that hard for you. I'm happy to help with any upcoming question.

Blocks: 1549421
Mentor: hskupin
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: CDP: Browser.getVersion reports outdated/hardcoded jsVersion → Browser.getVersion should return the current and not a hardcoded JavaScript version
Whiteboard: [lang=js]

I think Comment 2 was meant for @CanadaHonk, he was the one that found the code and added the report.

Flags: needinfo?(oj)

I'm interested in getting it fixed but not sure how to start. If there's any relevant docs or code for getting the SpiderMonkey version in use and adding a test, please send it.

Flags: needinfo?(oj) → needinfo?(hskupin)

Is there any chat (Matrix/IRC/etc) for discussing Firefox's CDP implementation?

Compute jsVersion using Firefox version instead of using a hardcoded
value. Also added relevant tests where existing version checks are.

Assignee: nobody → oj
Status: NEW → ASSIGNED

The needinfo is no longer needed given that we discussed it on Element yesterday and I can see a patch uploaded. That's great! Thanks!

Flags: needinfo?(hskupin)
Pushed by hskupin@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/64caad7bc3bc [cdp] Browser.getVersion: compute jsVersion and add tests r=webdriver-reviewers,whimboo
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 110 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: