Bug 133125 - Use a per app directory structure for website data
Summary: Use a per app directory structure for website data
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Anders Carlsson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-20 10:21 PDT by Anders Carlsson
Modified: 2014-05-23 15:50 PDT (History)
2 users (show)

See Also:


Attachments
Patch (3.31 KB, patch)
2014-05-20 10:25 PDT, Anders Carlsson
no flags Details | Formatted Diff | Diff
Patch (3.27 KB, patch)
2014-05-22 09:45 PDT, Anders Carlsson
mitz: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Anders Carlsson 2014-05-20 10:21:23 PDT
Use a per app directory distructure for website data
Comment 1 Anders Carlsson 2014-05-20 10:25:23 PDT
Created attachment 231775 [details]
Patch
Comment 2 Tim Horton 2014-05-20 13:23:10 PDT
Comment on attachment 231775 [details]
Patch

r=me too (especially if you fix the differently-scoped-same-name NSURL *url which always makes me slightly nervous)
Comment 3 Anders Carlsson 2014-05-22 09:45:04 PDT
Created attachment 231892 [details]
Patch
Comment 4 mitz 2014-05-23 11:10:16 PDT
Comment on attachment 231892 [details]
Patch

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

> Source/WebKit2/ChangeLog:9
> +        Put Website data in subdirectories of ~/Library/WebKit/<bundle ID>/WebsiteData.

website

> Source/WebKit2/UIProcess/API/Cocoa/WKProcessPool.mm:125
> +    if (![[NSFileManager defaultManager] createDirectoryAtURL:url withIntermediateDirectories:YES attributes:nil error:nullptr])
> +        RELEASE_ASSERT_NOT_REACHED();

It doesn’t seem appropriate to assert that directory creation didn’t fail. Certain external conditions, such as permissions on intermediate directories, can make the assertion false.
Comment 5 Anders Carlsson 2014-05-23 12:00:22 PDT
Committed r169271: <http://trac.webkit.org/changeset/169271>
Comment 6 Mark Hahnenberg 2014-05-23 15:50:42 PDT
(In reply to comment #5)
> Committed r169271: <http://trac.webkit.org/changeset/169271>

This looks like it broke the following API tests on the WK2 debug bots:

  WKNavigation.DidFailProvisionalNavigation
  WKNavigation.LoadRequest
  WKNavigation.NavigationDelegate
  _WKDownload.CancelDownload
  _WKDownload.ConvertResponseToDownload
  _WKDownload.DownloadDelegate
  _WKDownload.DownloadMissingResource
  _WKDownload.DownloadRequest
  _WKDownload.OriginatingWebView

For backtraces of the crashes, see: http://build.webkit.org/builders/Apple%20Mavericks%20Debug%20WK2%20%28Tests%29/builds/4851/steps/run-api-tests/logs/stdio

For a history of when these failures started, see: http://build.webkit.org/builders/Apple%20Mavericks%20Debug%20WK2%20%28Tests%29?numbuilds=25