diff --git a/layout/base/FrameLayerBuilder.cpp b/layout/base/FrameLayerBuilder.cpp index 23e0763e954b..7b67b0c3c744 100644 --- a/layout/base/FrameLayerBuilder.cpp +++ b/layout/base/FrameLayerBuilder.cpp @@ -3604,8 +3604,7 @@ FrameLayerBuilder::StoreDataForFrame(nsIFrame* aFrame, FrameLayerBuilder::ClippedDisplayItem::~ClippedDisplayItem() { if (mInactiveLayerManager) { - BasicLayerManager* basic = static_cast(mInactiveLayerManager.get()); - basic->SetUserData(&gLayerManagerLayerBuilder, nullptr); + mInactiveLayerManager->SetUserData(&gLayerManagerLayerBuilder, nullptr); } }