WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
259170
don't call deferNonVisibleProcessEearlyMemoryCleanupTimer from worker threads
https://bugs.webkit.org/show_bug.cgi?id=259170
Summary
don't call deferNonVisibleProcessEearlyMemoryCleanupTimer from worker threads
Cameron McCormack (:heycam)
Reported
2023-07-12 18:38:28 PDT
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.
Attachments
Add attachment
proposed patch, testcase, etc.
Cameron McCormack (:heycam)
Comment 1
2023-07-12 18:39:16 PDT
rdar://110910174
Cameron McCormack (:heycam)
Comment 2
2023-07-12 19:11:16 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/15805
EWS
Comment 3
2023-07-12 21:53:02 PDT
Committed
266024@main
(1ace3d3f33b2): <
https://commits.webkit.org/266024@main
> Reviewed commits have been landed. Closing PR #15805 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug