Closed Bug 1890918 Opened 11 months ago Closed 11 months ago

WARNING: 'aNode1 == aNode2', file dom/base/nsContentUtils.cpp:11365 when running `editing/run/caret*`

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

defect

Tracking

()

RESOLVED FIXED
126 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox124 --- wontfix
firefox125 --- wontfix
firefox126 --- fixed

People

(Reporter: masayuki, Assigned: masayuki)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

When I run ./mach wpt testing/web-platform/tests/editing/run/caret*, I see the following warning:

WARNING: 'aNode1 == aNode2', file M:/src/dom/base/nsContentUtils.cpp:11365

The call stack is:

 0:15.55 pid:2020 #01: mozilla::ContentComparator::LessThan (M:\src\layout\painting\nsDisplayList.cpp:2576)
 0:15.55 pid:2020 #02: std::stable_sort<mozilla::nsDisplayItem **,`lambda at M:\fx64-dbg\dist\include\nsTArray.h:2408:22'> (C:\Users\toybox\.mozbuild\vs\VC\Tools\MSVC\14.39.33519\include\algorithm:8386)       
 0:15.55 pid:2020 #03: mozilla::nsDisplayList::Sort<mozilla::nsDisplayItem *,mozilla::ContentComparator> (M:\src\layout\painting\nsDisplayList.h:3214)
 0:15.55 pid:2020 #04: mozilla::nsDisplayListCollection::SerializeWithCorrectZOrder (M:\src\layout\painting\nsDisplayList.cpp:8582)
 0:15.55 pid:2020 #05: nsHTMLScrollFrame::MaybeCreateTopLayerAndWrapRootItems (M:\src\layout\generic\nsGfxScrollFrame.cpp:3797)
 0:15.55 pid:2020 #06: nsHTMLScrollFrame::BuildDisplayList (M:\src\layout\generic\nsGfxScrollFrame.cpp:4272)
 0:15.55 pid:2020 #07: nsIFrame::BuildDisplayListForSimpleChild (M:\src\layout\generic\nsIFrame.cpp:4009)
 0:15.55 pid:2020 #08: nsIFrame::BuildDisplayListForChild (M:\src\layout\generic\nsIFrame.cpp:4112)
 0:15.55 pid:2020 #09: mozilla::ViewportFrame::BuildDisplayList (M:\src\layout\generic\ViewportFrame.cpp:65)
 0:15.55 pid:2020 #10: nsIFrame::BuildDisplayListForStackingContext (M:\src\layout\generic\nsIFrame.cpp:3473)
 0:15.55 pid:2020 #11: nsLayoutUtils::PaintFrame (M:\src\layout\base\nsLayoutUtils.cpp:3248)
 0:15.55 pid:2020 #12: mozilla::PresShell::PaintInternal (M:\src\layout\base\PresShell.cpp:6578)
 0:15.55 pid:2020 #13: nsViewManager::ProcessPendingUpdatesPaint (M:\src\view\nsViewManager.cpp:409)
 0:15.55 pid:2020 #14: nsViewManager::ProcessPendingUpdatesForView (M:\src\view\nsViewManager.cpp:344)
 0:15.55 pid:2020 #15: nsViewManager::ProcessPendingUpdates (M:\src\view\nsViewManager.cpp:917)
 0:15.55 pid:2020 #16: nsRefreshDriver::Tick (M:\src\layout\base\nsRefreshDriver.cpp:2842)
 0:15.55 pid:2020 #17: mozilla::RefreshDriverTimer::TickRefreshDrivers (M:\src\layout\base\nsRefreshDriver.cpp:345)
 0:15.55 pid:2020 #18: mozilla::RefreshDriverTimer::Tick (M:\src\layout\base\nsRefreshDriver.cpp:363)

It's called by the comparator. It seems that it's fine to just remove the NS_WARN_IF, but in theory, comparetor should check it before calling the method to save the calling cost (although I guess it's optimized actually).

Set release status flags based on info from the regressing bug 1879579

It seems that it's okay to remove NS_WARN_IF in
nsContentUtils::CompareTreePosition, but in theory, the comparator should
check it first to save the cost of calling the method. Although it may be
optimized by the compiler.

Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/e8a43c54c24e Make `ContentComparator::LessThan()` check whether the content nodes are different before calling `nsContentUtils::CompareTreePosition` r=emilio
Status: ASSIGNED → RESOLVED
Closed: 11 months ago
Resolution: --- → FIXED
Target Milestone: --- → 126 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: