Title: [273786] branches/safari-612.1.5-branch/Source/WebKit
- Revision
- 273786
- Author
- [email protected]
- Date
- 2021-03-02 19:08:19 -0800 (Tue, 02 Mar 2021)
Log Message
Cherry-pick r273265. rdar://problem/74953476
UserMediaPermissionRequestManagerProxy may be released while computing capture device list
https://bugs.webkit.org/show_bug.cgi?id=222236
<rdar://74480265>
Reviewed by Youenn Fablet.
* UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
(WebKit::UserMediaPermissionRequestManagerProxy::computeFilteredDeviceList): Return early
if `weakThis` is NULL.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@273265 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-612.1.5-branch/Source/WebKit/ChangeLog (273785 => 273786)
--- branches/safari-612.1.5-branch/Source/WebKit/ChangeLog 2021-03-03 03:08:15 UTC (rev 273785)
+++ branches/safari-612.1.5-branch/Source/WebKit/ChangeLog 2021-03-03 03:08:19 UTC (rev 273786)
@@ -1,3 +1,32 @@
+2021-03-02 Alan Coon <[email protected]>
+
+ Cherry-pick r273265. rdar://problem/74953476
+
+ UserMediaPermissionRequestManagerProxy may be released while computing capture device list
+ https://bugs.webkit.org/show_bug.cgi?id=222236
+ <rdar://74480265>
+
+ Reviewed by Youenn Fablet.
+
+ * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
+ (WebKit::UserMediaPermissionRequestManagerProxy::computeFilteredDeviceList): Return early
+ if `weakThis` is NULL.
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@273265 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2021-02-22 Eric Carlson <[email protected]>
+
+ UserMediaPermissionRequestManagerProxy may be released while computing capture device list
+ https://bugs.webkit.org/show_bug.cgi?id=222236
+ <rdar://74480265>
+
+ Reviewed by Youenn Fablet.
+
+ * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
+ (WebKit::UserMediaPermissionRequestManagerProxy::computeFilteredDeviceList): Return early
+ if `weakThis` is NULL.
+
2021-02-24 Russell Epstein <[email protected]>
Cherry-pick r273424. rdar://problem/74708164
Modified: branches/safari-612.1.5-branch/Source/WebKit/UIProcess/UserMediaPermissionRequestManagerProxy.cpp (273785 => 273786)
--- branches/safari-612.1.5-branch/Source/WebKit/UIProcess/UserMediaPermissionRequestManagerProxy.cpp 2021-03-03 03:08:15 UTC (rev 273785)
+++ branches/safari-612.1.5-branch/Source/WebKit/UIProcess/UserMediaPermissionRequestManagerProxy.cpp 2021-03-03 03:08:19 UTC (rev 273786)
@@ -712,6 +712,10 @@
static const unsigned defaultMaximumMicrophoneCount = 1;
platformGetMediaStreamDevices([this, weakThis = makeWeakPtr(this), revealIdsAndLabels, completion = WTFMove(completion)](auto&& devices) mutable {
+
+ if (!weakThis)
+ completion({ });
+
unsigned cameraCount = 0;
unsigned microphoneCount = 0;
@@ -736,10 +740,9 @@
filteredDevices.append(revealIdsAndLabels ? device : CaptureDevice({ }, device.type(), { }, { }));
}
- if (weakThis)
- m_hasFilteredDeviceList = !revealIdsAndLabels;
+ weakThis->m_hasFilteredDeviceList = !revealIdsAndLabels;
+ ALWAYS_LOG(LOGIDENTIFIER, filteredDevices.size(), " devices revealed");
- ALWAYS_LOG(LOGIDENTIFIER, filteredDevices.size(), " devices revealed");
completion(WTFMove(filteredDevices));
});
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes