Closed Bug 749225 Opened 12 years ago Closed 12 years ago

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

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 797322

People

(Reporter: miker, Unassigned)

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
Closed: 12 years ago
Resolution: --- → DUPLICATE
See also bug 797325 as to why even when Preprocess is helpful, the stacktraces still aren't.
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.