Closed
Bug 16569
Opened 25 years ago
Closed 25 years ago
substringData throws exception when offset==length
Categories
(Core :: DOM: Core & HTML, defect, P3)
Tracking
()
People
(Reporter: dbaron, Assigned: waqar)
Details
DESCRIPTION: Text::substringData() should only throw an exception when offset >
Text::length, not when offset == Text::length. This is very similar to
bug 9777.
The problem should be fixed by changing the ">=" currently at
http://lxr.mozilla.org/mozilla/source/layout/base/src/nsGenericDOMDataNode.cpp#288
to a ">".
STEPS TO REPRODUCE:
* Load http://www.fas.harvard.edu/~dbaron/dom/test/one-core-xml/Text
* Press the button
ACTUAL RESULTS:
* It stops after 7 lines of output and an exception is seen in the text window.
EXPECTED RESULTS:
* much more output
* no exception
DOES NOT WORK CORRECTLY ON:
* Linux, apprunner, 1999-10-15-11-M11
Updated•25 years ago
|
Assignee: vidur → waqar
Comment 1•25 years ago
|
||
Waqar, this should be dealt with by your recent checkin. Please confirm and
close the bug.
Reporter | ||
Comment 2•25 years ago
|
||
This is actually a different bug, but it's a similar one-line fix.
Reporter | ||
Comment 3•25 years ago
|
||
OK, it is fixed, I think. I was looking at the source code, and for some reason
LXR is showing the old code, but CVS blame is showing me the right thing.
Reporter | ||
Updated•25 years ago
|
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → DUPLICATE
Reporter | ||
Comment 4•25 years ago
|
||
splitText internally uses substringData, so it was the same bug. For some
reason LXR is returning old code, and I saw this bug looking at the code and
thought it wasn't fixed.
It's fixed now anyway.
*** This bug has been marked as a duplicate of 9777 ***
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•