forked from mirrors/gecko-dev
Bug 1384669: Reduce refcount churn in BidiParagraphData by using non-refcounted pointer hash keys. r=jfkthame
We don't need to bother with refcounting for these pointers, because they're pointing to DOM elements, and the DOM is basically immutable during reflow. And BidiParagraphData is a stack-only class which only lives for a short period of reflow - so it can assume these pointers' targets will stick around for its whole life. MozReview-Commit-ID: J3SfRYoRweX --HG-- extra : rebase_source : 9ebab968fdb1e4cc30033ab0744d883a9b0d820e
This commit is contained in:
parent
e1dcb01130
commit
7b2a0e9d5a
1 changed files with 3 additions and 1 deletions
|
|
@ -16,6 +16,7 @@
|
|||
#include "nsContainerFrame.h"
|
||||
#include "nsInlineFrame.h"
|
||||
#include "nsPlaceholderFrame.h"
|
||||
#include "nsPointerHashKeys.h"
|
||||
#include "nsFirstLetterFrame.h"
|
||||
#include "nsUnicodeProperties.h"
|
||||
#include "nsTextFrame.h"
|
||||
|
|
@ -132,7 +133,8 @@ struct MOZ_STACK_CLASS BidiParagraphData
|
|||
AutoTArray<char16_t, 16> mEmbeddingStack;
|
||||
AutoTArray<nsIFrame*, 16> mLogicalFrames;
|
||||
AutoTArray<nsLineBox*, 16> mLinePerFrame;
|
||||
nsDataHashtable<nsISupportsHashKey, int32_t> mContentToFrameIndex;
|
||||
nsDataHashtable<nsPtrHashKey<const nsIContent>, int32_t>
|
||||
mContentToFrameIndex;
|
||||
// Cached presentation context for the frames we're processing.
|
||||
nsPresContext* mPresContext;
|
||||
bool mIsVisual;
|
||||
|
|
|
|||
Loading…
Reference in a new issue