Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e018e14a52a36302d6477e82a4bac29cb64ba283
      
https://github.com/WebKit/WebKit/commit/e018e14a52a36302d6477e82a4bac29cb64ba283
  Author: Chris Dumez <[email protected]>
  Date:   2025-12-22 (Mon, 22 Dec 2025)

  Changed paths:
    M Source/WTF/wtf/RefPtr.h
    M Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp

  Log Message:
  -----------
  Assert that m_ptr is non-null in RefPtr's `operator->`
https://bugs.webkit.org/show_bug.cgi?id=304490

Reviewed by Alan Baradlay.

Assert that m_ptr is non-null in RefPtr's `operator->`, to make it more
likely to catch bugs in debug builds. Unfortunately, we are not able to
use a RELEASE_ASSERT() due to performance constraints. However, a null
dereference is undefined behavior so it will not necessarily crash and get
caught unless we have an assertion in place.

* Source/WTF/wtf/RefPtr.h:
* Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::textDidChangeInTextField):
(WTR::InjectedBundle::textFieldDidBeginEditing):
(WTR::InjectedBundle::textFieldDidEndEditing):

Canonical link: https://commits.webkit.org/304890@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to