Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 66269aa7892043cde78409b3a415bc1e48e58a38
      
https://github.com/WebKit/WebKit/commit/66269aa7892043cde78409b3a415bc1e48e58a38
  Author: Sihui Liu <[email protected]>
  Date:   2024-11-06 (Wed, 06 Nov 2024)

  Changed paths:
    M Source/WebKit/NetworkProcess/cache/NetworkCacheIOChannel.h
    M Source/WebKit/NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm
    M Source/WebKit/NetworkProcess/cache/NetworkCacheIOChannelCurl.cpp
    M Source/WebKit/NetworkProcess/cache/NetworkCacheIOChannelGLib.cpp
    M Source/WebKit/NetworkProcess/cache/NetworkCacheStorage.cpp

  Log Message:
  -----------
  Make NetworkCache::IOChannel thread-safe
https://bugs.webkit.org/show_bug.cgi?id=282616
rdar://139291512

Reviewed by Ben Nham.

In current implementation, NetworkCache::IOChannel is expected to be accessed 
from different threads, see the
implementation of read() and write(), so we should make it thread-safe with 
lock. This patch also removes unnecessary
data members of IOChannel, so that we don't need to make isolated copy of them 
or protect them.

* Source/WebKit/NetworkProcess/cache/NetworkCacheIOChannel.h:
(WebKit::NetworkCache::IOChannel::open):
(WebKit::NetworkCache::IOChannel::WTF_GUARDED_BY_LOCK):
(WebKit::NetworkCache::IOChannel::path const): Deleted.
(WebKit::NetworkCache::IOChannel::type const): Deleted.
(WebKit::NetworkCache::IOChannel::isOpened const): Deleted.
* Source/WebKit/NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:
(WebKit::NetworkCache::IOChannel::IOChannel):
(WebKit::NetworkCache::IOChannel::read):
(WebKit::NetworkCache::IOChannel::write):
* Source/WebKit/NetworkProcess/cache/NetworkCacheIOChannelCurl.cpp:
(WebKit::NetworkCache::IOChannel::IOChannel):
(WebKit::NetworkCache::IOChannel::~IOChannel):
(WebKit::NetworkCache::IOChannel::read):
(WebKit::NetworkCache::IOChannel::write):
* Source/WebKit/NetworkProcess/cache/NetworkCacheIOChannelGLib.cpp:
(WebKit::NetworkCache::IOChannel::IOChannel):
(WebKit::NetworkCache::IOChannel::read):
(WebKit::NetworkCache::IOChannel::write):
* Source/WebKit/NetworkProcess/cache/NetworkCacheStorage.cpp:
(WebKit::NetworkCache::Storage::dispatchReadOperation):
(WebKit::NetworkCache::Storage::traverseWithinRootPath):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to