Bug 143668 - Network Cache: Add thread-safe accessors for storage paths
Summary: Network Cache: Add thread-safe accessors for storage paths
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-13 08:11 PDT by Antti Koivisto
Modified: 2015-04-15 04:21 PDT (History)
1 user (show)

See Also:


Attachments
patch (10.45 KB, patch)
2015-04-13 08:37 PDT, Antti Koivisto
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Antti Koivisto 2015-04-13 08:11:11 PDT
Less need for clunky StringCaptures.
Comment 1 Antti Koivisto 2015-04-13 08:37:54 PDT
Created attachment 250639 [details]
patch
Comment 2 Darin Adler 2015-04-13 09:55:09 PDT
Comment on attachment 250639 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=250639&action=review

> Source/WebKit2/NetworkProcess/cache/NetworkCacheStorage.h:83
> +    const String baseDirectoryPath() const;
> +    const String directoryPath() const;

I don’t understand the value of returning const String rather than String. These should just return String.
Comment 3 Anders Carlsson 2015-04-13 11:29:43 PDT
Comment on attachment 250639 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=250639&action=review

> Source/WebKit2/NetworkProcess/cache/NetworkCacheStorage.cpp:79
> +    // This is safe from any thread.
> +    return StringView(m_baseDirectoryPath).toString();

I think this could just call m_baseDirectoryPath.isolatedCopy() (if m_baseDirectoryPath was kept a String)
Comment 4 Antti Koivisto 2015-04-15 04:21:04 PDT
https://trac.webkit.org/r182841