[webkit-changes] [WebKit/WebKit] 8c1fe1: Regression(266113 at main) Crash under WebKit::Proces...

Chris Dumez noreply at github.com
Thu Jul 20 17:11:13 PDT 2023


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

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

  Log Message:
  -----------
  Regression(266113 at 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 at 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




More information about the webkit-changes mailing list