Closed Bug 1183891 Opened 9 years ago Closed 9 years ago

2,100 instances of "NS_ENSURE_TRUE(newRoot) failed" emitted from dom/base/nsRange.cpp during linux64 debug testing

Categories

(Core :: DOM: Core & HTML, defect)

41 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla42
Tracking Status
firefox42 --- fixed

People

(Reporter: erahm, Assigned: erahm)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

> 2064 [NNNNN] WARNING: NS_ENSURE_TRUE(newRoot) failed: file dom/base/nsRange.cpp, line 1132

This warning [1] shows up in the following test suites:

> mozilla-central_ubuntu64_vm-debug_test-mochitest-e10s-2-bm53-tests1-linux64-build12.txt:2051
> mozilla-central_ubuntu64_vm-debug_test-mochitest-2-bm67-tests1-linux64-build1.txt:2051

It shows up in 8 tests. A few of the most prevalent:

> 1554 - dom/imptests/html/dom/ranges/test_Range-set.html
> 1554 - dom/imptests/html/dom/ranges/test_Range-set.html
> 261 - dom/imptests/editing/selecttest/test_extend.html
> 261 - dom/imptests/editing/selecttest/test_extend.html
> 177 - dom/imptests/editing/selecttest/test_collapse.html
> 177 - dom/imptests/editing/selecttest/test_collapse.html
> 59 - dom/imptests/editing/selecttest/test_selectAllChildren.html
> 59 - dom/imptests/editing/selecttest/test_selectAllChildren.html

[1] https://hg.mozilla.org/mozilla-central/annotate/e786406bc683/dom/base/nsRange.cpp#l1132
Actually this is limited to 2 tests (4 if we count both non-e10s and e10s). The generic warning shows up further, but the one from line 1132 is limited to:

> 777 - dom/imptests/html/dom/ranges/test_Range-set.html
> 777 - dom/imptests/html/dom/ranges/test_Range-set.html
> 255 - dom/imptests/editing/selecttest/test_extend.html
> 255 - dom/imptests/editing/selecttest/test_extend.html

AFAICT test_Range-set.html [1] and [2] test_extend.html intentionally trigger the warning and down the line we throw an appropriate exception (INVALID_NODE_TYPE_ERR). It seems like the warning is unnecessary.

[1] https://hg.mozilla.org/mozilla-central/annotate/e7e69cc8c07b/dom/imptests/html/dom/ranges/test_Range-set.html
[2] https://hg.mozilla.org/mozilla-central/annotate/e7e69cc8c07b/dom/imptests/editing/selecttest/test_extend.html
Olli, would you mind reviewing this or redirecting to a more appropriate reviewer?
Attachment #8633817 - Flags: review?(bugs)
Assignee: nobody → erahm
Status: NEW → ASSIGNED
Comment on attachment 8633817 [details] [diff] [review]
Remove warning if invalid node type is passed to nsRange::SetStart

yeah, this should be per spec, so expected.
Attachment #8633817 - Flags: review?(bugs) → review+
https://hg.mozilla.org/mozilla-central/rev/f6c777924104
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: