Use 1-origin column number for JavaScript locations in console message
Categories
(Core :: JavaScript Engine, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox122 | --- | fixed |
People
(Reporter: arai, Assigned: arai)
References
Details
Attachments
(6 files)
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review |
SpiderMonkey had been using 0-origin column number for script location, while using 1-origin column number for errors.
bug 1862814 is about to switch to consistently using 1-origin column numbers everywhere.
There are multiple places in Gecko-side that uses 0-origin column number when reporting to console etc.
Assignee | ||
Comment 1•10 months ago
|
||
Depends on D193368
Assignee | ||
Comment 2•10 months ago
|
||
nsJSUtils::GetCallingLocation is used mostly for console message and logging,
except for the following:
- profiler label in TimeoutHandler
- CC log for TimeoutHandler
- events in nsIConsoleAPIStorage
- JSON used by mozilla::dom::SendReports
Depends on D193369
Assignee | ||
Comment 3•10 months ago
|
||
Depends on D193370
Assignee | ||
Comment 4•10 months ago
|
||
Depends on D193371
Assignee | ||
Comment 5•10 months ago
|
||
Depends on D193372
Assignee | ||
Comment 6•10 months ago
|
||
Depends on D193373
Comment 7•10 months ago
|
||
I don't have too strong opinion whether 0 or 1 origin should be used. You may want to ask also for example peterv.
Comment 8•10 months ago
|
||
And this all needs review from devtools peers.
Assignee | ||
Comment 9•10 months ago
|
||
Thank you for reviewing!
I've added devtools-reviewers, and also asked peterv in chat.
the main part of the devtools change is handled in bug 1862693, but yeah, it's better getting their review for things that touches console message.
Comment 10•10 months ago
|
||
(In reply to Tooru Fujisawa [:arai] from comment #9)
I've added devtools-reviewers, and also asked peterv in chat.
I think this is fine, hopefully nobody is really relying on this detail. I looked at the Reporting API spec for example, and it doesn't specify whether the line/column numbers are 0-based or 1-based. AFAICT Chrome is using 1-based.
Updated•10 months ago
|
Comment 11•10 months ago
|
||
Comment 13•10 months ago
|
||
Backed out along with Bug 1862693, Bug 1864155, Bug 1862814, Bug 1865005 for causing bustage on nsRFPService.cpp.
- backout: https://hg.mozilla.org/integration/autoland/rev/275cd8d44829f57197d7d70055f5a88bf890d153
- push: https://treeherder.mozilla.org/jobs?repo=autoland&group_state=expanded&revision=a4f3e7625abf4496dc121ee0585c349dbcfab0ac
- failure log: https://treeherder.mozilla.org/logviewer?job_id=437233289&repo=autoland&lineNumber=82723
[task 2023-11-22T11:52:46.461Z] 11:52:46 INFO - In file included from Unified_cpp_resistfingerprinting0.cpp:11:
[task 2023-11-22T11:52:46.461Z] 11:52:46 ERROR - /builds/worker/checkouts/gecko/toolkit/components/resistfingerprinting/nsRFPService.cpp:1443:26: error: no member named 'zeroOriginValue' in 'JS::ColumnNumberOneOrigin'; did you mean 'oneOriginValue'?
[task 2023-11-22T11:52:46.462Z] 11:52:46 INFO - 1443 | aColumnNum = columnNum.zeroOriginValue();
[task 2023-11-22T11:52:46.463Z] 11:52:46 INFO - | ^~~~~~~~~~~~~~~
[task 2023-11-22T11:52:46.463Z] 11:52:46 INFO - | oneOriginValue
[task 2023-11-22T11:52:46.464Z] 11:52:46 INFO - /builds/worker/workspace/obj-build/dist/include/js/ColumnNumber.h:232:12: note: 'oneOriginValue' declared here
[task 2023-11-22T11:52:46.464Z] 11:52:46 INFO - 232 | uint32_t oneOriginValue() const {
[task 2023-11-22T11:52:46.465Z] 11:52:46 INFO - | ^
[task 2023-11-22T11:52:46.465Z] 11:52:46 INFO - 1 error generated.
[task 2023-11-22T11:52:46.465Z] 11:52:46 ERROR - gmake[4]: *** [/builds/worker/checkouts/gecko/config/rules.mk:690: Unified_cpp_resistfingerprinting0.o] Error 1
[task 2023-11-22T11:52:46.466Z] 11:52:46 INFO - gmake[4]: Leaving directory '/builds/worker/workspace/obj-build/toolkit/components/resistfingerprinting'
[task 2023-11-22T11:52:46.467Z] 11:52:46 INFO - gmake[4]: Target 'target-objects' not remade because of errors.
[task 2023-11-22T11:52:46.467Z] 11:52:46 ERROR - gmake[3]: *** [/builds/worker/checkouts/gecko/config/recurse.mk:72: toolkit/components/resistfingerprinting/target-objects] Error 2
Assignee | ||
Comment 14•10 months ago
|
||
this is an autoland-conflict with bug 1864826 patch
will address it shortly.
Comment 15•10 months ago
|
||
Comment 17•10 months ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/49d94b91efad
https://hg.mozilla.org/mozilla-central/rev/5420aecaffcd
https://hg.mozilla.org/mozilla-central/rev/0fb806d69104
https://hg.mozilla.org/mozilla-central/rev/2f0ce7338b3f
https://hg.mozilla.org/mozilla-central/rev/a3c471ba10ce
https://hg.mozilla.org/mozilla-central/rev/89f0bd90367b
Description
•