Closed Bug 331482 Opened 18 years ago Closed 18 years ago

Wrong line number reported in js console, with textarea in page

Categories

(Core :: DOM: HTML Parser, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla1.9alpha1

People

(Reporter: martijn.martijn, Assigned: mrbkap)

References

Details

(Keywords: fixed1.8.1, testcase, Whiteboard: [patch])

Attachments

(2 files)

See upcoming testcase, I would expect to see:
"
Error: Martijn is not defined
Source File: file:///C:/Documents%20and%20Settings/mw22/Bureaublad/js_linenumber.htm
Line: 22
"

Instead, I get:
"
Error: Martijn is not defined
Source File: file:///C:/Documents%20and%20Settings/mw22/Bureaublad/js_linenumber.htm
Line: 18
"

That's 4 lines too early.
That's precisely the amount of returns I used inside the <textarea> tag, no coincidence.
Attached file testcase
Assignee: general → mrbkap
Component: JavaScript Engine → HTML: Parser
OS: Windows XP → All
Priority: -- → P3
QA Contact: general → parser
Hardware: PC → All
Whiteboard: [patch]
Target Milestone: --- → mozilla1.9alpha
Status: NEW → ASSIGNED
Attached patch FixSplinter Review
This was driver error on my part. The end condition needs to include newlines so that ConsumeUntil can count them.
Attachment #217037 - Flags: superreview?(jst)
Attachment #217037 - Flags: review?(jst)
Attachment #217037 - Flags: superreview?(jst)
Attachment #217037 - Flags: superreview?(bugmail)
Attachment #217037 - Flags: review?(jst)
Attachment #217037 - Flags: review?(bugmail)
Attachment #217037 - Flags: superreview?(bugmail)
Attachment #217037 - Flags: superreview+
Attachment #217037 - Flags: review?(bugmail)
Attachment #217037 - Flags: review+
Fix checked into trunk.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Checkin for this bug may have caused a 15% increase in number of allocations on balsa. See bug 333173.
*** Bug 319312 has been marked as a duplicate of this bug. ***
Comment on attachment 217037 [details] [diff] [review]
Fix

Is this something that we'd consider taking for beta2? The patch simply makes sure that we count newlines in <textarea> and <title> correctly.
Attachment #217037 - Flags: approval1.8.1?
Attachment #217037 - Flags: approval1.8.1? → approval1.8.1+
Keywords: fixed1.8.1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: