Closed Bug 1441054 Opened 6 years ago Closed 6 years ago

Intermittent GECKO(6136) | Assertion failure: mPresContext->mLayoutPhaseCount[eLayoutPhase_FrameC] == 0 (display list building in the middle of frame construction), at z:/build/build/src/layout/base/nsAutoLayoutPhase.cpp:51

Categories

(Core :: Widget: Win32, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1438939

People

(Reporter: intermittent-bug-filer, Unassigned)

Details

(Keywords: intermittent-failure)

nsIconChannel::AsyncOpen2 is called during frame construction, and it can spin the event loop:

nsCSSFrameConstructor::InitAndRestoreFrame -> nsImageBoxFrame::UpdateImage -> nsContentUtils::LoadImage-> imgLoader::LoadImage-> nsIconChannel::AsyncOpen2-> nsIconChannel::AsyncOpen-> nsIconChannel::MakeInputStream-> nsIconChannel::GetHIconFromFile [image/decoders/icon/win/nsIconChannel.cpp:418] -> ::SHGetFileInfo -> ... -> event loop -> Paint

We should avoid spinning the event loop during frame construction.

If the result of nsIconChannel::GetHIconFromFile is needed synchronously, we have a problem. If it's not needed synchronously, we could post a runnable in nsIconChannel::GetHIconFromFile, call ::SHGetFileInfo from that runnable (where we are safely allowed to spin the event loop), and then post the results back to where we need them.
Component: Gecko Profiler → Widget: Win32
Priority: P5 → --
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.