Skip to content

Commit

Permalink
Stop using CheckedRef with AccessibilityObject
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=266706
rdar://119935028

Reviewed by Brent Fulgham.

Stop using CheckedRef with AccessibilityObject. Use WeakRef instead to
generate more actionable crashes.

* Source/WebCore/accessibility/AccessibilityObject.h:
* Source/WebCore/accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::addChildren):

Canonical link: https://commits.webkit.org/272358@main
  • Loading branch information
cdumez committed Dec 20, 2023
1 parent 6bf65b8 commit 3237bcd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Source/WebCore/accessibility/AccessibilityObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class ScrollableArea;

bool nodeHasPresentationRole(Node*);

class AccessibilityObject : public AXCoreObject, public CanMakeWeakPtr<AccessibilityObject>, public CanMakeCheckedPtr {
class AccessibilityObject : public AXCoreObject, public CanMakeWeakPtr<AccessibilityObject> {
public:
virtual ~AccessibilityObject();

Expand Down
3 changes: 2 additions & 1 deletion Source/WebCore/accessibility/AccessibilityTable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
#include "RenderTable.h"
#include "RenderTableCell.h"
#include <wtf/Scope.h>
#include <wtf/WeakRef.h>

#include <queue>

Expand Down Expand Up @@ -483,7 +484,7 @@ void AccessibilityTable::addChildren()
RefPtr<HTMLTableCaptionElement> captionElement;

struct DownwardGrowingCell {
CheckedRef<AccessibilityTableCell> axObject;
WeakRef<AccessibilityTableCell> axObject;
// The column the cell starts in.
unsigned x;
// The number of columns the cell spans (called "width" in the spec).
Expand Down

0 comments on commit 3237bcd

Please sign in to comment.