[Webkit-unassigned] [Bug 259170] New: don't call deferNonVisibleProcessEearlyMemoryCleanupTimer from worker threads

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jul 12 18:38:28 PDT 2023


            Bug ID: 259170
           Summary: don't call
                    deferNonVisibleProcessEearlyMemoryCleanupTimer from
                    worker threads
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebKit Process Model
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: heycam at apple.com

We call deferNonVisibleProcessEearlyMemoryCleanupTimer in RemoteResourceCacheProxy::recordNativeImageUse. The idea there is to avoid discarding decoded image data in background tabs if the background tab is drawing images, which might be some canvas work, or it could be other things like Safari taking a tab snapshot. If we didn't avoid this, we could thrash between discarding decoded data and redecoding.

OffscreenCanvas can also draw images on worker threads, but deferNonVisibleProcessEearlyMemoryCleanupTimer is not safe to call from non-main threads. We can safely skip this call if we're not on the main thread: workers do not have access to images which are stored in the MemoryCache, so we are not at risk of discarding decoded image data that the worker will want to re-decode to draw.

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230713/9ed92e7c/attachment-0001.htm>

More information about the webkit-unassigned mailing list