- Revision
- 231442
- Author
- [email protected]
- Date
- 2018-05-07 10:38:25 -0700 (Mon, 07 May 2018)
Log Message
Substitute CrossOriginPreflightResultCache::clear() for CrossOriginPreflightResultCache::empty()
https://bugs.webkit.org/show_bug.cgi?id=185170
Reviewed by Per Arne Vollan.
Source/WebCore:
Rename CrossOriginPreflightResultCache::empty() to CrossOriginPreflightResultCache::clear() make
it consistent with the terminology we use in WebKit to signify a function that clears a collection.
A member function named "empty" is expected to return an instance of a class in its "empty state".
For example, StringImpl::empty() returns a StringImpl instance that represents the empty string.
However CrossOriginPreflightResultCache::empty() clears out the cache in-place. We should rename
this function to better describe its purpose.
* loader/CrossOriginPreflightResultCache.cpp:
(WebCore::CrossOriginPreflightResultCache::clear):
(WebCore::CrossOriginPreflightResultCache::empty): Deleted.
* loader/CrossOriginPreflightResultCache.h:
Source/WebKit:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::clearResourceCaches):
(WebKit::WebProcess::deleteWebsiteData):
Source/WebKitLegacy/mac:
* Misc/WebCache.mm:
(+[WebCache empty]):
Source/WebKitLegacy/win:
* WebCache.cpp:
(WebCache::empty):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (231441 => 231442)
--- trunk/Source/WebCore/ChangeLog 2018-05-07 17:36:15 UTC (rev 231441)
+++ trunk/Source/WebCore/ChangeLog 2018-05-07 17:38:25 UTC (rev 231442)
@@ -1,3 +1,22 @@
+2018-05-07 Daniel Bates <[email protected]>
+
+ Substitute CrossOriginPreflightResultCache::clear() for CrossOriginPreflightResultCache::empty()
+ https://bugs.webkit.org/show_bug.cgi?id=185170
+
+ Reviewed by Per Arne Vollan.
+
+ Rename CrossOriginPreflightResultCache::empty() to CrossOriginPreflightResultCache::clear() make
+ it consistent with the terminology we use in WebKit to signify a function that clears a collection.
+ A member function named "empty" is expected to return an instance of a class in its "empty state".
+ For example, StringImpl::empty() returns a StringImpl instance that represents the empty string.
+ However CrossOriginPreflightResultCache::empty() clears out the cache in-place. We should rename
+ this function to better describe its purpose.
+
+ * loader/CrossOriginPreflightResultCache.cpp:
+ (WebCore::CrossOriginPreflightResultCache::clear):
+ (WebCore::CrossOriginPreflightResultCache::empty): Deleted.
+ * loader/CrossOriginPreflightResultCache.h:
+
2018-05-06 Dean Jackson <[email protected]>
WebGL: Reset simulated values after validation fails
Modified: trunk/Source/WebCore/loader/CrossOriginPreflightResultCache.cpp (231441 => 231442)
--- trunk/Source/WebCore/loader/CrossOriginPreflightResultCache.cpp 2018-05-07 17:36:15 UTC (rev 231441)
+++ trunk/Source/WebCore/loader/CrossOriginPreflightResultCache.cpp 2018-05-07 17:38:25 UTC (rev 231442)
@@ -145,7 +145,7 @@
return false;
}
-void CrossOriginPreflightResultCache::empty()
+void CrossOriginPreflightResultCache::clear()
{
ASSERT(isMainThread());
m_preflightHashMap.clear();
Modified: trunk/Source/WebCore/loader/CrossOriginPreflightResultCache.h (231441 => 231442)
--- trunk/Source/WebCore/loader/CrossOriginPreflightResultCache.h 2018-05-07 17:36:15 UTC (rev 231441)
+++ trunk/Source/WebCore/loader/CrossOriginPreflightResultCache.h 2018-05-07 17:38:25 UTC (rev 231442)
@@ -62,15 +62,12 @@
class CrossOriginPreflightResultCache {
WTF_MAKE_NONCOPYABLE(CrossOriginPreflightResultCache); WTF_MAKE_FAST_ALLOCATED;
-
public:
WEBCORE_EXPORT static CrossOriginPreflightResultCache& singleton();
-
WEBCORE_EXPORT void appendEntry(const String& origin, const URL&, std::unique_ptr<CrossOriginPreflightResultCacheItem>);
WEBCORE_EXPORT bool canSkipPreflight(const String& origin, const URL&, StoredCredentialsPolicy, const String& method, const HTTPHeaderMap& requestHeaders);
+ WEBCORE_EXPORT void clear();
- WEBCORE_EXPORT void empty();
-
private:
friend NeverDestroyed<CrossOriginPreflightResultCache>;
CrossOriginPreflightResultCache();
Modified: trunk/Source/WebKit/ChangeLog (231441 => 231442)
--- trunk/Source/WebKit/ChangeLog 2018-05-07 17:36:15 UTC (rev 231441)
+++ trunk/Source/WebKit/ChangeLog 2018-05-07 17:38:25 UTC (rev 231442)
@@ -1,3 +1,14 @@
+2018-05-07 Daniel Bates <[email protected]>
+
+ Substitute CrossOriginPreflightResultCache::clear() for CrossOriginPreflightResultCache::empty()
+ https://bugs.webkit.org/show_bug.cgi?id=185170
+
+ Reviewed by Per Arne Vollan.
+
+ * WebProcess/WebProcess.cpp:
+ (WebKit::WebProcess::clearResourceCaches):
+ (WebKit::WebProcess::deleteWebsiteData):
+
2018-05-07 Brian Burg <[email protected]>
Web Inspector: opt out of process swap on navigation if a Web Inspector frontend is connected
Modified: trunk/Source/WebKit/WebProcess/WebProcess.cpp (231441 => 231442)
--- trunk/Source/WebKit/WebProcess/WebProcess.cpp 2018-05-07 17:36:15 UTC (rev 231441)
+++ trunk/Source/WebKit/WebProcess/WebProcess.cpp 2018-05-07 17:38:25 UTC (rev 231442)
@@ -757,7 +757,7 @@
MemoryCache::singleton().evictResources();
// Empty the cross-origin preflight cache.
- CrossOriginPreflightResultCache::singleton().empty();
+ CrossOriginPreflightResultCache::singleton().clear();
}
static inline void addCaseFoldedCharacters(StringHasher& hasher, const String& string)
@@ -1288,7 +1288,7 @@
PageCache::singleton().pruneToSizeNow(0, PruningReason::None);
MemoryCache::singleton().evictResources(sessionID);
- CrossOriginPreflightResultCache::singleton().empty();
+ CrossOriginPreflightResultCache::singleton().clear();
}
if (websiteDataTypes.contains(WebsiteDataType::Credentials)) {
Modified: trunk/Source/WebKitLegacy/mac/ChangeLog (231441 => 231442)
--- trunk/Source/WebKitLegacy/mac/ChangeLog 2018-05-07 17:36:15 UTC (rev 231441)
+++ trunk/Source/WebKitLegacy/mac/ChangeLog 2018-05-07 17:38:25 UTC (rev 231442)
@@ -1,3 +1,13 @@
+2018-05-07 Daniel Bates <[email protected]>
+
+ Substitute CrossOriginPreflightResultCache::clear() for CrossOriginPreflightResultCache::empty()
+ https://bugs.webkit.org/show_bug.cgi?id=185170
+
+ Reviewed by Per Arne Vollan.
+
+ * Misc/WebCache.mm:
+ (+[WebCache empty]):
+
2018-05-04 Timothy Hatcher <[email protected]>
Deprecate legacy WebView and friends
Modified: trunk/Source/WebKitLegacy/mac/Misc/WebCache.mm (231441 => 231442)
--- trunk/Source/WebKitLegacy/mac/Misc/WebCache.mm 2018-05-07 17:36:15 UTC (rev 231441)
+++ trunk/Source/WebKitLegacy/mac/Misc/WebCache.mm 2018-05-07 17:38:25 UTC (rev 231442)
@@ -118,7 +118,7 @@
webApplicationCacheStorage().empty();
// Empty the Cross-Origin Preflight cache
- WebCore::CrossOriginPreflightResultCache::singleton().empty();
+ WebCore::CrossOriginPreflightResultCache::singleton().clear();
}
#if PLATFORM(IOS)
Modified: trunk/Source/WebKitLegacy/win/ChangeLog (231441 => 231442)
--- trunk/Source/WebKitLegacy/win/ChangeLog 2018-05-07 17:36:15 UTC (rev 231441)
+++ trunk/Source/WebKitLegacy/win/ChangeLog 2018-05-07 17:38:25 UTC (rev 231442)
@@ -1,3 +1,13 @@
+2018-05-07 Daniel Bates <[email protected]>
+
+ Substitute CrossOriginPreflightResultCache::clear() for CrossOriginPreflightResultCache::empty()
+ https://bugs.webkit.org/show_bug.cgi?id=185170
+
+ Reviewed by Per Arne Vollan.
+
+ * WebCache.cpp:
+ (WebCache::empty):
+
2018-04-27 Chris Dumez <[email protected]>
Use WindowProxy instead of DOMWindow in our IDL
Modified: trunk/Source/WebKitLegacy/win/WebCache.cpp (231441 => 231442)
--- trunk/Source/WebKitLegacy/win/WebCache.cpp 2018-05-07 17:36:15 UTC (rev 231441)
+++ trunk/Source/WebKitLegacy/win/WebCache.cpp 2018-05-07 17:38:25 UTC (rev 231442)
@@ -223,7 +223,7 @@
WebApplicationCache::storage().empty();
// Empty the Cross-Origin Preflight cache
- WebCore::CrossOriginPreflightResultCache::singleton().empty();
+ WebCore::CrossOriginPreflightResultCache::singleton().clear();
return S_OK;
}