"ASSERTION: mEndOffset is beyond the end of this node" in nsRange::ContentInserted

RESOLVED FIXED in mozilla9

Status

()

Core
DOM: Core & HTML
RESOLVED FIXED
6 years ago
4 years ago

People

(Reporter: Jesse Ruderman, Assigned: Mats Palmgren (vacation - back in August))

Tracking

(Blocks: 1 bug, {assertion, regression, testcase})

Trunk
mozilla9
assertion, regression, testcase
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(4 attachments, 1 obsolete attachment)

(Reporter)

Description

6 years ago
Created attachment 553549 [details]
testcase

###!!! ASSERTION: mEndOffset is beyond the end of this node: 'static_cast<PRUint32>(mEndOffset) <= aInfo->mChangeEnd', file content/base/src/nsRange.cpp, line 305
(Reporter)

Comment 1

6 years ago
Created attachment 553551 [details]
stack trace
I added this assertion in bug 191864.  I'll investigate...
Assignee: nobody → matspal
Blocks: 191864
OS: Mac OS X → All
Hardware: x86_64 → All
Blocks: 682463
No longer blocks: 682463
Keywords: regression
Created attachment 558235 [details] [diff] [review]
fix

The problem is that nsRange::CutContents uses SplitData internally
in a different way than splitText, in some case it removes the
new node:
http://mxr.mozilla.org/mozilla-central/source/content/base/src/nsRange.cpp#1395

Calling SetTextInternal with NULL in that case makes us use the old
path in nsRange::CharacterDataChanged that doesn't try to change the
boundary point.
Attachment #558235 - Flags: review?(Olli.Pettay)
Created attachment 558236 [details] [diff] [review]
regression test

Updated

6 years ago
Attachment #558235 - Flags: review?(Olli.Pettay) → review+
Created attachment 559078 [details] [diff] [review]
regression test
Attachment #558236 - Attachment is obsolete: true
http://hg.mozilla.org/integration/mozilla-inbound/rev/077597e9accd
http://hg.mozilla.org/integration/mozilla-inbound/rev/ed1946447c5e
Flags: in-testsuite+
Whiteboard: [inbound]
Target Milestone: --- → mozilla9
http://hg.mozilla.org/mozilla-central/rev/077597e9accd
http://hg.mozilla.org/mozilla-central/rev/ed1946447c5e
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Whiteboard: [inbound]
Component: DOM: Traversal-Range → DOM: Core & HTML
Product: Core → Core
You need to log in before you can comment on or make changes to this bug.