diff --git a/layout/base/nsLayoutUtils.cpp b/layout/base/nsLayoutUtils.cpp index 854c401938..e78536d00e 100644 --- a/layout/base/nsLayoutUtils.cpp +++ b/layout/base/nsLayoutUtils.cpp @@ -9348,7 +9348,8 @@ nsLayoutUtils::GetNonAnonymousStyleContext(nsIFrame* aFrame) } MOZ_ASSERT(node, "Native anonymous element with no originating node?"); if (nsIFrame* primaryFrame = node->GetPrimaryFrame()) { - return RefPtr(primaryFrame->StyleContext()).forget(); + RefPtr context = primaryFrame->StyleContext(); + return context.forget(); } // If the element doesn't have primary frame, get the computed style // from the element directly.