Closed Bug 209118 Opened 23 years ago Closed 23 years ago

Link in JavaScript console jumps to the wrong source line in XBL when URL points to one of the bindings in a file

Categories

(Core :: XBL, defect)

x86
Windows 98
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 127567

People

(Reporter: schapel, Assigned: hyatt)

References

Details

Reproducible: Always Steps to Reproduce: 1. Turn on |Show strict JavaScript warnings| and |Show chrome JavaScript errors and warnings| in the Debug Preferences. 2. Right-click in a mail message pane to bring up the context menu. 3. Select Print Preview. 4. Open the JavaScript console. 5. Click on the last warning: redeclaration of var ifreq. Expected results: View Source window of printPreviewBindings.xml appears and line 37 of doPrintPreview() is highlighted, showing the redeclaration of var ifreq. Actual Results: View Source window of printPreviewBindings.xml appears and line 37 of the file is highlighted, showing an entirely unrelated part of the source file. What's going on is that line number N is considered the line number N of the file, rather than line number N of the function or N lines after the anchor of the URL. This happens in trunk build 2003061008 on Windows 98.
Yeah, well... The line number the JS console reports SHOULD be the Nth line of the file. Any time it's not, that's a bug in whoever is providing the line number to the JS console (usually the JS engine, but not always). See bug 208030 -- I suspect this is a duplicate.
Depends on: 208030
As far as I can tell, the line numbers are correct, they're just offsets from the URL anchor, not the beginning of the file. I don't think this is related to bug 208030, or any other bug I can find, at all.
> As far as I can tell, the line numbers are correct, they're just offsets from > the URL anchor, not the beginning of the file. That would be a bug. Most likely, in the XBL content sink... Over to XBL to look into this. Bryner, Brendan, do you have any idea who knows the XBL content sink code?
Assignee: hewitt → hyatt
Component: JavaScript Console → XBL
QA Contact: jrgm → ian
Summary: Link in JavaScript console jumps to the wrong source line when URL contains an anchor → Link in JavaScript console jumps to the wrong source line in XBL when URL points to one of the bindings in a file
*** This bug has been marked as a duplicate of 127567 ***
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.