[webkit-changes] [WebKit/WebKit] 2dfb4e: [WK2] WebKit abandons compiled sandbox profiles

Chris Dumez noreply at github.com
Wed Feb 21 10:21:27 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2dfb4e9da6fd0294f2899c73592c9d4647fe0d9f
      https://github.com/WebKit/WebKit/commit/2dfb4e9da6fd0294f2899c73592c9d4647fe0d9f
  Author: Chris Dumez <cdumez at apple.com>
  Date:   2024-02-21 (Wed, 21 Feb 2024)

  Changed paths:
    M Source/WebKit/Shared/mac/AuxiliaryProcessMac.mm

  Log Message:
  -----------
  [WK2] WebKit abandons compiled sandbox profiles
https://bugs.webkit.org/show_bug.cgi?id=212177
rdar://54613619

Reviewed by Per Arne Vollan.

WebKit generates new compiled sandbox profiles whenever sandbox profiles are updated or
whenever webkit directories change (which is super common for WebKitTestRunner). Previous
compiled sandbox profiles do not get deleted and therefore may accumulate.

To address the issue, stop including the sandbox profile hash in the compiled sandbox's
filename. We end up using:
- com.apple.WebKit.Networking.Sandbox/CompiledSandbox
instead of
- com.apple.WebKit.Networking.Sandbox/CompiledSandbox+D2hn1Pn_lLcl-wJoTYvS45lVG6tqDaa3Lhp_AZPFesI

This means that every time the sandbox profile gets updated, we'll just overwrite the
previous version on disk. Therefore, compiled sandbox files will no longer accumulate.

The one inconvenient I can think of is when running two different versions of Safari
locally. Both instances will overwrite each other compiled sandbox files, which could
impact process launch time when alternating between the 2 instances. However, this is
not a super common use case and the impact is only a minor performance one, no
correctness issue.

* Source/WebKit/Shared/mac/AuxiliaryProcessMac.mm:
(WebKit::sandboxFilePath):
(WebKit::applySandbox):

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



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


More information about the webkit-changes mailing list