Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 3cc50bc287a862a00f885e5699d6377d9a1c236c
      
https://github.com/WebKit/WebKit/commit/3cc50bc287a862a00f885e5699d6377d9a1c236c
  Author: Alex Christensen <[email protected]>
  Date:   2025-01-08 (Wed, 08 Jan 2025)

  Changed paths:
    M Source/WebCore/loader/ProgressTracker.cpp
    M Source/WebCore/loader/ProgressTracker.h

  Log Message:
  -----------
  ProgressTracker should have a WeakPtr instead of a RefPtr<LocalFrame>
https://bugs.webkit.org/show_bug.cgi?id=285649
rdar://142492439

Reviewed by Charlie Wolfe.

There are common crashes resulting from the ProgressTracker destructor
destroying a Frame.  The ProgressTracker does not need to keep the Frame
alive, so use a WeakPtr instead.

Since it can now become null at any point, I added null checks before
using it everywhere.  Since it no longer keeps the LocalFrame alive,
I create a RefPtr on the stack before using it.

* Source/WebCore/loader/ProgressTracker.cpp:
(WebCore::ProgressTracker::progressStarted):
(WebCore::ProgressTracker::finalProgressComplete):
(WebCore::ProgressTracker::incrementProgress):
(WebCore::ProgressTracker::progressHeartbeatTimerFired):
* Source/WebCore/loader/ProgressTracker.h:

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to