+2018-01-20 Chris Dumez <cdumez@apple.com>
+
+ DOMCache data sometimes not properly removed when clearing data for a given origin
+ https://bugs.webkit.org/show_bug.cgi?id=181887
+ <rdar://problem/36671239>
+
+ Reviewed by Youenn Fablet.
+
+ * NetworkProcess/cache/CacheStorageEngine.cpp:
+ (WebKit::CacheStorage::Engine::clearCachesForOrigin):
+ This code was iterating through folders on disk, then reading the folder's origin
+ from the origin file on disk. Then, if the origin would match the one we want to
+ delete, it would regenerate the folder path using cachesRootPath(*folderOrigin).
+ I don't know how but on my machine, I was ended up in a state where the path
+ generated by cachesRootPath(*folderOrigin) differed from the actual folder path
+ we read the origin from (Likely a different salt?). To make the code more robust,
+ I updated the code to delete "folderPath", which is the path we read the origin
+ from.
+