Changeset 249712 in webkit
- Timestamp:
- Sep 10, 2019 6:52:37 AM (5 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r249703 r249712 1 2019-09-10 Youenn Fablet <youenn@apple.com> 2 3 UserMediaProcessManager is revoking sandbox extensions too aggressively 4 https://bugs.webkit.org/show_bug.cgi?id=201638 5 6 Reviewed by Eric Carlson. 7 8 Sandbox revocation was sometimes happening when a page is being closed while another page from the same process is starting capture. 9 In that case, revocation might happen while it should not. 10 To prevent this, we do not revoke sandbox extensions if there are pending captures for a page of the process. 11 Whenever a page does not have any pending capture, sandbox extensions may be revoked. 12 13 Covered by OnDeviceChangeCrash API test in debug mode. 14 15 * UIProcess/UserMediaPermissionRequestManagerProxy.cpp: 16 (WebKit::UserMediaPermissionRequestManagerProxy::finishGrantingRequest): 17 * UIProcess/UserMediaPermissionRequestManagerProxy.h: 18 (WebKit::UserMediaPermissionRequestManagerProxy::hasPendingCapture const): 19 * UIProcess/UserMediaProcessManager.cpp: 20 (WebKit::UserMediaProcessManager::revokeSandboxExtensionsIfNeeded): 21 1 22 2019-09-09 Chris Dumez <cdumez@apple.com> 2 23 -
trunk/Source/WebKit/UIProcess/UserMediaPermissionRequestManagerProxy.cpp
r249275 r249712 242 242 if (!weakThis) 243 243 return; 244 --m_hasPendingCapture; 244 if (!--m_hasPendingCapture) 245 UserMediaProcessManager::singleton().revokeSandboxExtensionsIfNeeded(page().process()); 245 246 }, m_page.webPageID()); 246 247 -
trunk/Source/WebKit/UIProcess/UserMediaPermissionRequestManagerProxy.h
r248847 r249712 88 88 89 89 void setMockCaptureDevicesEnabledOverride(Optional<bool> enabled) { m_mockDevicesEnabledOverride = enabled; } 90 bool hasPendingCapture() const { return m_hasPendingCapture; } 90 91 91 92 private: -
trunk/Source/WebKit/UIProcess/UserMediaProcessManager.cpp
r245335 r249712 131 131 bool hasAudioCapture = false; 132 132 bool hasVideoCapture = false; 133 134 UserMediaPermissionRequestManagerProxy::forEach([&hasAudioCapture, &hasVideoCapture, &process](auto& managerProxy) { 133 bool hasPendingCapture = false; 134 135 UserMediaPermissionRequestManagerProxy::forEach([&hasAudioCapture, &hasVideoCapture, &hasPendingCapture, &process](auto& managerProxy) { 135 136 if (&process != &managerProxy.page().process()) 136 137 return; 137 138 hasAudioCapture |= managerProxy.page().isCapturingAudio(); 138 139 hasVideoCapture |= managerProxy.page().isCapturingVideo(); 139 }); 140 hasPendingCapture |= managerProxy.hasPendingCapture(); 141 }); 142 143 if (hasPendingCapture) 144 return; 140 145 141 146 if (hasAudioCapture && hasVideoCapture)
Note: See TracChangeset
for help on using the changeset viewer.