[webkit-reviews] review granted: [Bug 265849] AX: AccessibilityNodeObject::mouseButtonListener does not null-check Node::parentElement : [Attachment 468881] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Dec 5 12:30:27 PST 2023
David Kilzer (:ddkilzer) <ddkilzer at webkit.org> has granted review:
Bug 265849: AX: AccessibilityNodeObject::mouseButtonListener does not
null-check Node::parentElement
https://bugs.webkit.org/show_bug.cgi?id=265849
Attachment 468881: Patch
https://bugs.webkit.org/attachment.cgi?id=468881&action=review
--- Comment #5 from David Kilzer (:ddkilzer) <ddkilzer at webkit.org> ---
Comment on attachment 468881
--> https://bugs.webkit.org/attachment.cgi?id=468881
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=468881&action=review
r=me, but I think we should use a `RefPtr` here if possible.
> Source/WebCore/accessibility/AccessibilityNodeObject.cpp:1325
> - Node* node = this->node();
> + WeakPtr node = this->node();
> if (!node)
> return nullptr;
Using a `WeakPtr node` here is a good first-order change to stop using a raw
pointer, but I think we want to keep this `Node` alive for the duration of the
method since we're using it to iterate through a list of other elements.
Can we use `RefPtr node` here instead?
More information about the webkit-reviews
mailing list