Closed Bug 1183891 Opened 6 years ago Closed 6 years ago
2,100 instances of "NS
_ENSURE _TRUE(new Root) failed" emitted from dom/base/ns Range .cpp during linux64 debug testing
> 2064 [NNNNN] WARNING: NS_ENSURE_TRUE(newRoot) failed: file dom/base/nsRange.cpp, line 1132 This warning  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  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  and  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.  https://hg.mozilla.org/mozilla-central/annotate/e7e69cc8c07b/dom/imptests/html/dom/ranges/test_Range-set.html  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)
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+
You need to log in before you can comment on or make changes to this bug.