⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 273786 in webkit


Ignore:
Timestamp:
Mar 2, 2021, 7:08:19 PM (6 years ago)
Author:
Alan Coon
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

Location:
branches/safari-612.1.5-branch/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-612.1.5-branch/Source/WebKit/ChangeLog

    r273598 r273786  
     12021-03-02  Alan Coon  <alancoon@apple.com>
     2
     3        Cherry-pick r273265. rdar://problem/74953476
     4
     5    UserMediaPermissionRequestManagerProxy may be released while computing capture device list
     6    https://bugs.webkit.org/show_bug.cgi?id=222236
     7    <rdar://74480265>
     8   
     9    Reviewed by Youenn Fablet.
     10   
     11    * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
     12    (WebKit::UserMediaPermissionRequestManagerProxy::computeFilteredDeviceList): Return early
     13    if `weakThis` is NULL.
     14   
     15   
     16    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@273265 268f45cc-cd09-0410-ab3c-d52691b4dbfc
     17
     18    2021-02-22  Eric Carlson  <eric.carlson@apple.com>
     19
     20            UserMediaPermissionRequestManagerProxy may be released while computing capture device list
     21            https://bugs.webkit.org/show_bug.cgi?id=222236
     22            <rdar://74480265>
     23
     24            Reviewed by Youenn Fablet.
     25
     26            * UIProcess/UserMediaPermissionRequestManagerProxy.cpp:
     27            (WebKit::UserMediaPermissionRequestManagerProxy::computeFilteredDeviceList): Return early
     28            if `weakThis` is NULL.
     29
    1302021-02-24  Russell Epstein  <repstein@apple.com>
    231
  • branches/safari-612.1.5-branch/Source/WebKit/UIProcess/UserMediaPermissionRequestManagerProxy.cpp

    r273427 r273786  
    713713
    714714    platformGetMediaStreamDevices([this, weakThis = makeWeakPtr(this), revealIdsAndLabels, completion = WTFMove(completion)](auto&& devices) mutable {
     715
     716        if (!weakThis)
     717            completion({ });
     718
    715719        unsigned cameraCount = 0;
    716720        unsigned microphoneCount = 0;
    … …  
    737741        }
    738742
    739         if (weakThis)
    740             m_hasFilteredDeviceList = !revealIdsAndLabels;
    741 
     743        weakThis->m_hasFilteredDeviceList = !revealIdsAndLabels;
    742744        ALWAYS_LOG(LOGIDENTIFIER, filteredDevices.size(), " devices revealed");
     745
    743746        completion(WTFMove(filteredDevices));
    744747    });
Note: See TracChangeset for help on using the changeset viewer.