Closed Bug 797308 Opened 12 years ago Closed 12 years ago

Preprocessing js files should use //@line

Categories

(Firefox Build System :: General, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: Yoric, Unassigned)

Details

(Whiteboard: [mentor=Yoric][lang=python])

We have a number of preprocessed JavaScript files on m-c. Unfortunately, for any of these files, any stack trace line number will be false. This is pretty annoying for debugging, especially for intermittent oranges.

Now, as it turns out, our JS VM supports directives

//@line 1234

specifically for this kind of issues.

We should adapt Preprocessor.py to introduce these directives.
I am willing to mentor this, btw.
Whiteboard: [mentor=Yoric][lang=python]
It already does that.
http://mxr.mozilla.org/mozilla-central/source/config/Preprocessor.py#132

And for example, if I look in components/FeedWriter.js in an omni.ja from a try build i did recently, I can see:
//@line 652 "e:\builds\moz2_slave\try-w32\build\browser\components\feeds\src\FeedWriter.js"
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → INVALID
In that case, the preprocessor is not applied uniformly.

Experiment:
- add the following line to test_jsctypes.js.in
   throw new Error("BOOM");
- launch the test.

I added this at line 1770 and the stack displayed the error at line 1755.
I confirm that the preprocessor does its job correctly on test_jsctypes.js.in. I will continue the investigation.
For the record, the investigation moved to:
- bug 246286;
- bug 797326.
Component: Build Config → General
Product: Firefox → Firefox Build System
You need to log in before you can comment on or make changes to this bug.