Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d8a467a3231239387021498e1dfda32e543a9c94
      
https://github.com/WebKit/WebKit/commit/d8a467a3231239387021498e1dfda32e543a9c94
  Author: Ruthvik Konda <[email protected]>
  Date:   2026-07-09 (Thu, 09 Jul 2026)

  Changed paths:
    M Source/WebCore/Modules/model-element/PlaceholderModelPlayer.cpp
    M Source/WebCore/Modules/model-element/PlaceholderModelPlayer.h

  Log Message:
  -----------
  PlaceholderModelPlayer camera and animation methods do not call their 
completion handlers

https://bugs.webkit.org/show_bug.cgi?id=318820
rdar://181635780

Reviewed by Mike Wyrzykowski.

9 PlaceholderModelPlayer overrides (getCamera, setCamera, isPlayingAnimation,
setAnimationIsPlaying, isLoopingAnimation, setIsLoopingAnimation, 
animationDuration,
animationCurrentTime, and setAnimationCurrentTime) had empty bodies that 
returned
without invoking their CompletionHandler. A CompletionHandler must be called 
exactly
once: dropping it trips the assertion in ~CompletionHandler() in debug builds, 
and in
release leaves the corresponding JS promise unsettled.

Call each handler with the same unavailable value already used by
ModelProcessModelPlayerProxy: std::nullopt for the optional getters and false 
for the
boolean setters, so HTMLModelElement rejects the promise cleanly instead of 
hanging.

Drop the NODELETE annotation from those nine declarations: invoking a 
CompletionHandler
may run destructors and free memory (it destroys the wrapped callable), which 
NODELETE
asserts the function does not do, so the safer-cpp NoDeleteChecker flags it.

No new tests.

* Source/WebCore/Modules/model-element/PlaceholderModelPlayer.cpp:
(WebCore::PlaceholderModelPlayer::getCamera):
(WebCore::PlaceholderModelPlayer::setCamera):
(WebCore::PlaceholderModelPlayer::isPlayingAnimation):
(WebCore::PlaceholderModelPlayer::setAnimationIsPlaying):
(WebCore::PlaceholderModelPlayer::isLoopingAnimation):
(WebCore::PlaceholderModelPlayer::setIsLoopingAnimation):
(WebCore::PlaceholderModelPlayer::animationDuration):
(WebCore::PlaceholderModelPlayer::animationCurrentTime):
(WebCore::PlaceholderModelPlayer::setAnimationCurrentTime):
* Source/WebCore/Modules/model-element/PlaceholderModelPlayer.h:

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



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

Reply via email to