Changeset 245322 in webkit


Ignore:
Timestamp:
May 15, 2019 7:55:11 AM (5 years ago)
Author:
commit-queue@webkit.org
Message:

Allow NSFileCoordinator to be called from WebContent process
https://bugs.webkit.org/show_bug.cgi?id=197895
<rdar://problem/50107679>

Patch by Alex Christensen <achristensen@webkit.org> on 2019-05-15
Reviewed by Brent Fulgham.

Source/WebKit:

  • WebProcess/com.apple.WebProcess.sb.in:

Expand sandbox to allow use of com.apple.FileCoordination mach service like we do on iOS.

Tools:

Add a unit test that verifies calling the block succeeds.

  • TestWebKitAPI/Tests/WebKitCocoa/AdditionalReadAccessAllowedURLsPlugin.mm:

(-[AdditionalReadAccessAllowedURLsPlugIn webProcessPlugIn:didCreateBrowserContextController:]):

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r245320 r245322  
     12019-05-15  Alex Christensen  <achristensen@webkit.org>
     2
     3        Allow NSFileCoordinator to be called from WebContent process
     4        https://bugs.webkit.org/show_bug.cgi?id=197895
     5        <rdar://problem/50107679>
     6
     7        Reviewed by Brent Fulgham.
     8
     9        * WebProcess/com.apple.WebProcess.sb.in:
     10        Expand sandbox to allow use of com.apple.FileCoordination mach service like we do on iOS.
     11
    1122019-05-15  Devin Rousso  <drousso@apple.com>
    213
  • trunk/Source/WebKit/WebProcess/com.apple.WebProcess.sb.in

    r245246 r245322  
    594594       (global-name "com.apple.webinspector"))
    595595
     596(allow mach-lookup
     597    (global-name "com.apple.FileCoordination"))
     598
    596599;; Various services required by AppKit and other frameworks
    597600(allow mach-lookup
     
    987990        (syscall-number SYS_stat64_extended) ;; <rdar://problem/50473330>
    988991        (syscall-number SYS_lstat64_extended)
     992        (syscall-number SYS_iopolicysys)
     993        (syscall-number SYS_workq_open)
     994        (syscall-number SYS_getgroups)
    989995    )
    990996)
  • trunk/Tools/ChangeLog

    r245314 r245322  
     12019-05-15  Alex Christensen  <achristensen@webkit.org>
     2
     3        Allow NSFileCoordinator to be called from WebContent process
     4        https://bugs.webkit.org/show_bug.cgi?id=197895
     5        <rdar://problem/50107679>
     6
     7        Reviewed by Brent Fulgham.
     8
     9        Add a unit test that verifies calling the block succeeds.
     10
     11        * TestWebKitAPI/Tests/WebKitCocoa/AdditionalReadAccessAllowedURLsPlugin.mm:
     12        (-[AdditionalReadAccessAllowedURLsPlugIn webProcessPlugIn:didCreateBrowserContextController:]):
     13
    1142019-05-14  Andy Estes  <aestes@apple.com>
    215
  • trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/AdditionalReadAccessAllowedURLsPlugin.mm

    r242339 r245322  
    5353    _interface = [_WKRemoteObjectInterface remoteObjectInterfaceWithProtocol:@protocol(AdditionalReadAccessAllowedURLsProtocol)];
    5454    [[browserContextController _remoteObjectRegistry] registerExportedObject:self interface:_interface.get()];
     55
     56    __block bool blockCalled = false;
     57    NSFileCoordinator *coordinator = [[NSFileCoordinator alloc] initWithFilePresenter:nil];
     58    [coordinator coordinateReadingItemAtURL:[NSURL fileURLWithPath:@"/Applications/Safari.app"] options:NSFileCoordinatorReadingWithoutChanges error:nil byAccessor:^(NSURL *newURL) {
     59        blockCalled = true;
     60    }];
     61    ASSERT(blockCalled);
    5562}
    5663
Note: See TracChangeset for help on using the changeset viewer.