Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(640)

Side by Side Diff: third_party/WebKit/Source/modules/accessibility/AXTable.cpp

Issue 1207613004: Fix leaking AXNodeObjects when sub document detaches (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebased Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2008 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 m_columns.clear(); 352 m_columns.clear();
353 353
354 if (m_headerContainer) { 354 if (m_headerContainer) {
355 m_headerContainer->detachFromParent(); 355 m_headerContainer->detachFromParent();
356 m_headerContainer = nullptr; 356 m_headerContainer = nullptr;
357 } 357 }
358 } 358 }
359 359
360 void AXTable::addChildren() 360 void AXTable::addChildren()
361 { 361 {
362 ASSERT(!isDetached());
362 if (!isAXTable()) { 363 if (!isAXTable()) {
363 AXLayoutObject::addChildren(); 364 AXLayoutObject::addChildren();
364 return; 365 return;
365 } 366 }
366 367
367 ASSERT(!m_haveChildren); 368 ASSERT(!m_haveChildren);
368 369
369 m_haveChildren = true; 370 m_haveChildren = true;
370 if (!m_layoutObject || !m_layoutObject->isTable()) 371 if (!m_layoutObject || !m_layoutObject->isTable())
371 return; 372 return;
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 595
595 DEFINE_TRACE(AXTable) 596 DEFINE_TRACE(AXTable)
596 { 597 {
597 visitor->trace(m_rows); 598 visitor->trace(m_rows);
598 visitor->trace(m_columns); 599 visitor->trace(m_columns);
599 visitor->trace(m_headerContainer); 600 visitor->trace(m_headerContainer);
600 AXLayoutObject::trace(visitor); 601 AXLayoutObject::trace(visitor);
601 } 602 }
602 603
603 } // namespace blink 604 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698