Changeset 232360 in webkit


Ignore:
Timestamp:
May 31, 2018 12:13:35 PM (6 years ago)
Author:
Brent Fulgham
Message:

Don't attempt to extend sandbox when running tests with mock media devices
https://bugs.webkit.org/show_bug.cgi?id=186150
<rdar://problem/40690875>

Reviewed by Alexey Proskuryakov.

Avoid attempting to issue a sandbox extension to actual media devices when
running with Mock capture devices.

Also handle the 'denyNextRequest' test state outside of the USE(APPLE_INTERNAL_SDK)
guards, since it is needed for Open Source builds as well.

  • UIProcess/UserMediaProcessManager.cpp:

(WebKit::UserMediaProcessManager::willCreateMediaStream):

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r232356 r232360  
     12018-05-31  Brent Fulgham  <bfulgham@apple.com>
     2
     3        Don't attempt to extend sandbox when running tests with mock media devices
     4        https://bugs.webkit.org/show_bug.cgi?id=186150
     5        <rdar://problem/40690875>
     6
     7        Reviewed by Alexey Proskuryakov.
     8
     9        Avoid attempting to issue a sandbox extension to actual media devices when
     10        running with Mock capture devices.
     11
     12        Also handle the 'denyNextRequest' test state outside of the USE(APPLE_INTERNAL_SDK)
     13        guards, since it is needed for Open Source builds as well.
     14
     15        * UIProcess/UserMediaProcessManager.cpp:
     16        (WebKit::UserMediaProcessManager::willCreateMediaStream):
     17
    1182018-05-31  Antti Koivisto  <antti@apple.com>
    219
  • trunk/Source/WebKit/UIProcess/UserMediaProcessManager.cpp

    r232321 r232360  
    129129bool UserMediaProcessManager::willCreateMediaStream(UserMediaPermissionRequestManagerProxy& proxy, bool withAudio, bool withVideo)
    130130{
    131 #if ENABLE(SANDBOX_EXTENSIONS) && USE(APPLE_INTERNAL_SDK)
    132     auto& processStartingCapture = proxy.page().process();
    133 
    134     ASSERT(stateMap().contains(&processStartingCapture));
    135 
    136131    if (m_denyNextRequest) {
    137132        m_denyNextRequest = false;
    138133        return false;
    139134    }
     135   
     136    if (proxy.page().preferences().mockCaptureDevicesEnabled())
     137        return true;
     138   
     139#if ENABLE(SANDBOX_EXTENSIONS) && USE(APPLE_INTERNAL_SDK)
     140    auto& processStartingCapture = proxy.page().process();
     141
     142    ASSERT(stateMap().contains(&processStartingCapture));
    140143
    141144    auto& state = processState(processStartingCapture);
Note: See TracChangeset for help on using the changeset viewer.