Closed
Bug 9710
Opened 25 years ago
Closed 25 years ago
JS errors reported with wrong filename and line number
Categories
(Core :: DOM: Core & HTML, defect, P3)
Tracking
()
People
(Reporter: jband_mozilla, Assigned: vidur)
Details
given two files:
'a.html' with the three lines:
<html>
<script src="a.js"></script>
</html>
'a.js' with the single line
a ==== 0;
Apprunner reports the error:
URL: file:///h|/temp/a.html
Line text: 'a ==== 0;', Error text: '= 0;'
There are two problems here:
1) the filename is wrong. The error is in the 'included' a.js not in a.html
2) the linenumber is wrong. In this case the linenumber is not printed at all. I
see in NS_ScriptErrorReporter code that looks like:
if(report->lineno) {
printf("LineNo: %u", report->lineno);
}
The fact that the lineno is not printed implies that it is zero. Since the error
is on the first line of the file this implies that the engine is getting told
that the script source starts at line '0'. This is incorrect. We long ago
established the convention that line numbers in JS source (.html or .js) start
at line '1'.
These would both be good problems to fix since so much of the browser itself is
now written in JavaScript.
Reporter | ||
Updated•25 years ago
|
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → DUPLICATE
Updated•25 years ago
|
Status: RESOLVED → VERIFIED
Comment 3•25 years ago
|
||
Dup of 8045.
You need to log in
before you can comment on or make changes to this bug.
Description
•