Index: third_party/WebKit/Source/core/layout/ng/ng_physical_fragment_base.cc |
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_physical_fragment_base.cc b/third_party/WebKit/Source/core/layout/ng/ng_physical_fragment_base.cc |
index e67874631162059d63fa68d355f712b96d599dd9..3518e585411fc5c4f44bddd5a91efc5a65b82d5d 100644 |
--- a/third_party/WebKit/Source/core/layout/ng/ng_physical_fragment_base.cc |
+++ b/third_party/WebKit/Source/core/layout/ng/ng_physical_fragment_base.cc |
@@ -16,4 +16,11 @@ DEFINE_TRACE(NGPhysicalFragmentBase) { |
static_cast<NGPhysicalFragment*>(this)->traceAfterDispatch(visitor); |
} |
+void NGPhysicalFragmentBase::finalizeGarbageCollectedObject() { |
+ if (Type() == FragmentText) |
+ static_cast<NGPhysicalTextFragment*>(this)->~NGPhysicalTextFragment(); |
+ else |
+ static_cast<NGPhysicalFragment*>(this)->~NGPhysicalFragment(); |
+} |
+ |
} // namespace blink |