Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 8c1fe1cdba42c095f6063418579c15d209320ea8
      
https://github.com/WebKit/WebKit/commit/8c1fe1cdba42c095f6063418579c15d209320ea8
  Author: Chris Dumez <[email protected]>
  Date:   2023-07-20 (Thu, 20 Jul 2023)

  Changed paths:
    M Source/WebKit/UIProcess/ProcessThrottler.cpp

  Log Message:
  -----------
  Regression(266113@main) Crash under 
WebKit::ProcessThrottlerActivity::invalidate()
https://bugs.webkit.org/show_bug.cgi?id=259367
rdar://112620147

Reviewed by Brent Fulgham.

setAllowsActivities(false) would set `m_allowsActivities` to false and then
call invalidateAllActivities(). When invalidating the activities, they would
try to remove themselves from the activity map via
ProcessThrottler::removeActivity(). However, 266113@main made removeActivity()
early return if `m_allowsActivities` is false, since there is supposed to be
no activities in the map.

To address the issue, I am reversing the order of operations in
setAllowsActivities() so that we first invalidate activities, and then
set `m_allowsActivities` to false.

* Source/WebKit/UIProcess/ProcessThrottler.cpp:
(WebKit::ProcessThrottler::setAllowsActivities):

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


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to