Title: [289647] branches/safari-613.1.17.0-branch/Source/WebKit
- Revision
- 289647
- Author
- [email protected]
- Date
- 2022-02-11 11:58:34 -0800 (Fri, 11 Feb 2022)
Log Message
Cherry-pick r289380. rdar://problem/86904276
Reduce allocations and increase thread safety of constructedPath
https://bugs.webkit.org/show_bug.cgi?id=236286
<rdar://86904276>
Patch by Alex Christensen <[email protected]> on 2022-02-08
Reviewed by Chris Dumez.
* UIProcess/API/APIContentRuleListStore.cpp:
(API::constructedPathPrefix):
(API::ContentRuleListStore::getAvailableContentRuleListIdentifiers):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289380 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-613.1.17.0-branch/Source/WebKit/ChangeLog (289646 => 289647)
--- branches/safari-613.1.17.0-branch/Source/WebKit/ChangeLog 2022-02-11 19:58:30 UTC (rev 289646)
+++ branches/safari-613.1.17.0-branch/Source/WebKit/ChangeLog 2022-02-11 19:58:34 UTC (rev 289647)
@@ -1,3 +1,32 @@
+2022-02-11 Russell Epstein <[email protected]>
+
+ Cherry-pick r289380. rdar://problem/86904276
+
+ Reduce allocations and increase thread safety of constructedPath
+ https://bugs.webkit.org/show_bug.cgi?id=236286
+ <rdar://86904276>
+
+ Patch by Alex Christensen <[email protected]> on 2022-02-08
+ Reviewed by Chris Dumez.
+
+ * UIProcess/API/APIContentRuleListStore.cpp:
+ (API::constructedPathPrefix):
+ (API::ContentRuleListStore::getAvailableContentRuleListIdentifiers):
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289380 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2022-02-08 Alex Christensen <[email protected]>
+
+ Reduce allocations and increase thread safety of constructedPath
+ https://bugs.webkit.org/show_bug.cgi?id=236286
+ <rdar://86904276>
+
+ Reviewed by Chris Dumez.
+
+ * UIProcess/API/APIContentRuleListStore.cpp:
+ (API::constructedPathPrefix):
+ (API::ContentRuleListStore::getAvailableContentRuleListIdentifiers):
+
2022-02-08 Russell Epstein <[email protected]>
Cherry-pick r288090. rdar://problem/87601499
Modified: branches/safari-613.1.17.0-branch/Source/WebKit/UIProcess/API/APIContentRuleListStore.cpp (289646 => 289647)
--- branches/safari-613.1.17.0-branch/Source/WebKit/UIProcess/API/APIContentRuleListStore.cpp 2022-02-11 19:58:30 UTC (rev 289646)
+++ branches/safari-613.1.17.0-branch/Source/WebKit/UIProcess/API/APIContentRuleListStore.cpp 2022-02-11 19:58:34 UTC (rev 289647)
@@ -80,10 +80,10 @@
ContentRuleListStore::~ContentRuleListStore() = default;
// FIXME: Remove legacyFilename in 2022 or 2023 after users have had a chance to run the updating logic.
-static const WTF::String& constructedPathPrefix(bool legacyFilename)
+static const char* constructedPathPrefix(bool legacyFilename)
{
- static NeverDestroyed<WTF::String> prefix("ContentRuleList-");
- static NeverDestroyed<WTF::String> legacyPrefix("ContentExtension-");
+ static auto* prefix("ContentRuleList-");
+ static auto* legacyPrefix("ContentExtension-");
if (legacyFilename)
return legacyPrefix;
return prefix;
@@ -521,9 +521,9 @@
ASSERT(RunLoop::isMain());
m_readQueue->dispatch([protectedThis = Ref { *this }, storePath = m_storePath.isolatedCopy(), completionHandler = WTFMove(completionHandler)]() mutable {
auto prefix = constructedPathPrefix(false /*legacy*/);
- auto prefixLength = prefix.length();
+ auto prefixLength = strlen(prefix);
auto legacyPrefix = constructedPathPrefix(true /*legacy*/);
- auto legacyPrefixLength = legacyPrefix.length();
+ auto legacyPrefixLength = strlen(legacyPrefix);
Vector<WTF::String> identifiers;
for (auto& fileName : listDirectory(storePath)) {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes