Bug 134000 - Expose the location of website data
Summary: Expose the location of 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: InRadar
Depends on:
Blocks:
 
Reported: 2014-06-17 15:52 PDT by Anders Carlsson
Modified: 2014-06-18 09:22 PDT (History)
2 users (show)

See Also:


Attachments
Patch (5.22 KB, patch)
2014-06-17 15:54 PDT, Anders Carlsson
no flags Details | Formatted Diff | Diff
Patch (5.08 KB, patch)
2014-06-17 16:22 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-06-17 15:52:51 PDT
Expose the location of website data
Comment 1 Anders Carlsson 2014-06-17 15:54:45 PDT
Created attachment 233264 [details]
Patch
Comment 2 WebKit Commit Bot 2014-06-17 15:56:29 PDT
Attachment 233264 [details] did not pass style-queue:


ERROR: Source/WebKit2/Shared/mac/SandboxUtilities.cpp:39:  sandbox_container_path_for_pid is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
Total errors found: 1 in 5 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 mitz 2014-06-17 16:08:05 PDT
Comment on attachment 233264 [details]
Patch

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

> Source/WebKit2/Shared/mac/SandboxUtilities.cpp:50
> +static bool processIsAppSandboxed(pid_t pid)

Given what this does, I think the name is wrong. There is a difference between being in a container and being app-sandboxed (which implies the former), but this checks just for the container. So I think the name should be something like processHasContainer().

> Source/WebKit2/Shared/mac/SandboxUtilities.cpp:57
> +    if (path[0] == '\0')

!path[0]

> Source/WebKit2/Shared/mac/SandboxUtilities.cpp:63
> +bool processIsAppSandboxed()

Ditto.

> Source/WebKit2/UIProcess/API/Cocoa/WKProcessPool.mm:108
> ++ (NSURL *)_websiteDataURLForContainerWithURL:(NSURL *)containerURL

The fact that the containerURL parameter isn’t used is telling. This won’t work if called from a process that doesn’t have a container and wants to find the website data location for a process with the given container.
Comment 4 Anders Carlsson 2014-06-17 16:22:41 PDT
Created attachment 233267 [details]
Patch
Comment 5 WebKit Commit Bot 2014-06-17 16:24:15 PDT
Attachment 233267 [details] did not pass style-queue:


ERROR: Source/WebKit2/Shared/mac/SandboxUtilities.cpp:39:  sandbox_container_path_for_pid is incorrectly named. Don't use underscores in your identifier names.  [readability/naming/underscores] [4]
Total errors found: 1 in 5 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 6 mitz 2014-06-17 16:32:38 PDT
Comment on attachment 233267 [details]
Patch

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

> Source/WebKit2/Shared/mac/SandboxUtilities.cpp:57
> +    if (path[0] == '\0')

!path[0]
Comment 7 Anders Carlsson 2014-06-17 16:37:11 PDT
Committed r170084: <http://trac.webkit.org/changeset/170084>
Comment 8 mitz 2014-06-18 09:22:47 PDT
<rdar://problem/17350498>