Open Bug 772668 Opened 9 years ago Updated 1 month ago

"ASSERTION: aNode isn't in mRange, or something else weird happened" after failed justifyright


(Core :: DOM: Editor, defect, P5)





(Reporter: jruderman, Unassigned)


(Blocks 1 open bug)


(Keywords: assertion, testcase)


(2 files)

Attached file testcase
###!!! ASSERTION: aNode isn't in mRange, or something else weird happened: 'NS_SUCCEEDED(res) && !nodeBefore && !nodeAfter', file content/base/src/nsContentIterator.cpp, line 1437
Attached file stack trace
The test case seems awfully obfuscated.  If you're going to use DOM methods instead of just an HTML serialization, you can do stuff like

  document.documentElement.setAttributeNS(null, "contenteditable", "true");
  allNodes[1] = document.createElementNS("", "div");
  allNodes[1].setAttributeNS(null, "contenteditable", "false");
  allNodes[2] = document.createTextNode("x");
  (allNodes[1] || document.documentElement).appendChild(allNodes[2]);


  document.documentElement.contentEditable = true;
  var div = document.createElement("div");
  div.contentEditable = false;

What's the || business there even supposed to do?  allNodes[1] is certainly not null, so everything after it will just be ignored . . .

Similarly, this

  r0 = document.createRange();
  r0.setStart(allNodes[3], 1);
  r0.setEnd(allNodes[3], 1);

could be just

  getSelection().collapse(allNodes[3], 1);

This kind of change would make the tests a lot easier to understand . . .
Jesse's test cases are usually auto-generated using a fuzzer.  :-)
Yeah, I usually make those kinds of transformations manually before filing bugs.

This is roughly the form I use for automated reduction.  (The "||" allows the children of a removed node to remain in the document, for example.)
The fix for bug 887631 didn't take care of this one, fwiw.

Bulk-downgrade of unassigned, >=5 years untouched DOM/Storage bugs' priority.

If you have reason to believe this is wrong (especially for the severity), please write a comment and ni :jstutte.

Severity: normal → S4
Priority: -- → P5
You need to log in before you can comment on or make changes to this bug.