Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 29fc076372d066625d380ac350a0263c126c0351
      
https://github.com/WebKit/WebKit/commit/29fc076372d066625d380ac350a0263c126c0351
  Author: Ahmad Saleem <[email protected]>
  Date:   2026-07-13 (Mon, 13 Jul 2026)

  Changed paths:
    M Source/WebCore/html/HTMLVideoElement.cpp

  Log Message:
  -----------
  Simplify HTMLVideoElement::hasAvailableVideoFrame to avoid redundant player() 
and protect() calls
https://bugs.webkit.org/show_bug.cgi?id=319184
rdar://182031444

Reviewed by Jean-Yves Avenard and Chris Dumez.

hasAvailableVideoFrame() called player() three times and wrapped the
result in protect() twice. Hoist the player into a single local RefPtr
and fold the null check into the returned expression, so the pointer is
null-checked once and kept alive across both member accesses.

No change in behavior.

* Source/WebCore/html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::hasAvailableVideoFrame const):

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



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

Reply via email to