| Index: third_party/WebKit/Source/core/dom/Document.cpp
|
| diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
|
| index 2f287b36a75b8f9d58f0cfc4f61b89788eb359e6..313a4e1a74adebafae14a525ee8a9fbea779f56d 100644
|
| --- a/third_party/WebKit/Source/core/dom/Document.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/Document.cpp
|
| @@ -6630,21 +6630,13 @@ void Document::RecordDeferredLoadReason(WouldLoadReason reason) {
|
| }
|
|
|
| DEFINE_TRACE_WRAPPERS(Document) {
|
| + // node_lists_ are traced in their corresponding NodeListsNodeData, keeping
|
| + // them only alive for live nodes. Otherwise we would keep lists of dead
|
| + // nodes alive that have not yet been invalidated.
|
| visitor->TraceWrappers(imports_controller_);
|
| visitor->TraceWrappers(implementation_);
|
| visitor->TraceWrappers(style_sheet_list_);
|
| visitor->TraceWrappers(style_engine_);
|
| - for (int i = 0; i < kNumNodeListInvalidationTypes; ++i) {
|
| - for (auto list : node_lists_[i]) {
|
| - if (IsHTMLCollectionType(list->GetType())) {
|
| - visitor->TraceWrappersWithManualWriteBarrier(
|
| - static_cast<const HTMLCollection*>(list.Get()));
|
| - } else {
|
| - visitor->TraceWrappersWithManualWriteBarrier(
|
| - static_cast<const LiveNodeList*>(list.Get()));
|
| - }
|
| - }
|
| - }
|
| // Cannot trace in Supplementable<Document> as it is part of platform/ and
|
| // thus cannot refer to ScriptWrappableVisitor.
|
| visitor->TraceWrappers(
|
|
|