If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Stack trace: Incorrect line numbers for jsms that include preprocessor directives

RESOLVED DUPLICATE of bug 797322

Status

()

Core
Build Config
RESOLVED DUPLICATE of bug 797322
6 years ago
5 years ago

People

(Reporter: miker, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

When a jsm contains preprocessor directives it knocks the line numbers out of sync for stack traces. I guess this may also cause issues with choosing the correct line from the debugger.

e.g.
    if (modifiersAttr.match("accel"))
#ifdef XP_MACOSX
      combo.push(keysbundle.GetStringFromName("VK_META"));
#else
      combo.push(keysbundle.GetStringFromName("VK_CONTROL"));
#endif
    if (modifiersAttr.match("shift"))
      combo.push(keysbundle.GetStringFromName("VK_SHIFT"));

will offset the line by 4.
Is this something that should be fixed in the JS engine, or something that should be fixed in the preprocessor? IMO this bug should be moved to Core::Build Config and config/Preprocessor.py should be modified to insert blank lines whenever it takes things out so that line numbers are preserved.
Agreed.
Assignee: general → nobody
Component: JavaScript Engine → Build Config
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 797322
See also bug 797325 as to why even when Preprocess is helpful, the stacktraces still aren't.
You need to log in before you can comment on or make changes to this bug.