Title: [238873] trunk/Source/WebKit
Revision
238873
Author
you...@apple.com
Date
2018-12-04 12:57:56 -0800 (Tue, 04 Dec 2018)

Log Message

Calling getUserMedia in a link that was opened with target="_blank" does not work the second time
https://bugs.webkit.org/show_bug.cgi?id=188088
<rdar://problem/42681448>

Reviewed by Eric Carlson.

On closing a page, we need to make sure to consider that the capture is ended,
as otherwise WebPageProxy will not get noticed from WebPage, since WebPageProxy is no longer an IPC receiver.

* UIProcess/UserMediaProcessManager.cpp:
(WebKit::UserMediaProcessManager::endedCaptureSession):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::close):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (238872 => 238873)


--- trunk/Source/WebKit/ChangeLog	2018-12-04 20:25:02 UTC (rev 238872)
+++ trunk/Source/WebKit/ChangeLog	2018-12-04 20:57:56 UTC (rev 238873)
@@ -1,3 +1,19 @@
+2018-12-04  Youenn Fablet  <you...@apple.com>
+
+        Calling getUserMedia in a link that was opened with target="_blank" does not work the second time
+        https://bugs.webkit.org/show_bug.cgi?id=188088
+        <rdar://problem/42681448>
+
+        Reviewed by Eric Carlson.
+
+        On closing a page, we need to make sure to consider that the capture is ended,
+        as otherwise WebPageProxy will not get noticed from WebPage, since WebPageProxy is no longer an IPC receiver.
+
+        * UIProcess/UserMediaProcessManager.cpp:
+        (WebKit::UserMediaProcessManager::endedCaptureSession):
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::close):
+
 2018-12-04  Chris Dumez  <cdu...@apple.com>
 
         Regression(r238817) PSON Page Cache API tests are failing

Modified: trunk/Source/WebKit/UIProcess/UserMediaProcessManager.cpp (238872 => 238873)


--- trunk/Source/WebKit/UIProcess/UserMediaProcessManager.cpp	2018-12-04 20:25:02 UTC (rev 238872)
+++ trunk/Source/WebKit/UIProcess/UserMediaProcessManager.cpp	2018-12-04 20:57:56 UTC (rev 238873)
@@ -224,6 +224,8 @@
     bool hasAudioCapture = false;
     bool hasVideoCapture = false;
     for (auto& manager : state.managers()) {
+        if (manager == &proxy)
+            continue;
         if (manager->page().hasActiveAudioStream())
             hasAudioCapture = true;
         if (manager->page().hasActiveVideoStream())

Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.cpp (238872 => 238873)


--- trunk/Source/WebKit/UIProcess/WebPageProxy.cpp	2018-12-04 20:25:02 UTC (rev 238872)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.cpp	2018-12-04 20:57:56 UTC (rev 238873)
@@ -954,6 +954,10 @@
 
     m_isClosed = true;
 
+#if ENABLE(MEDIA_STREAM)
+    m_userMediaPermissionRequestManager = nullptr;
+#endif
+
     reportPageLoadResult(ResourceError { ResourceError::Type::Cancellation });
 
     if (m_activePopupMenu)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to