(no bug) Add comment to clarify the reason of using UniquePtr in nsRubyBaseContainerFrame::Reflow. DONTBUILD, comment-only

This commit is contained in:
Xidorn Quan
2014-12-11 11:24:53 +11:00
parent 0c93f7f740
commit 954b87b838

View File

@@ -290,6 +290,9 @@ nsRubyBaseContainerFrame::Reflow(nsPresContext* aPresContext,
// They are conceptually the state of the RTCs, but we don't actually
// reflow those RTCs in this code. These two arrays are holders of
// the reflow states and line layouts.
// Since there are pointers refer to reflow states and line layouts,
// it is necessary to guarantee that they won't be moved. For this
// reason, they are wrapped in UniquePtr here.
nsAutoTArray<UniquePtr<nsHTMLReflowState>, RTC_ARRAY_SIZE> reflowStates;
nsAutoTArray<UniquePtr<nsLineLayout>, RTC_ARRAY_SIZE> lineLayouts;
reflowStates.SetCapacity(totalCount);