Changeset 252207 in webkit


Ignore:
Timestamp:
Nov 7, 2019 2:53:47 PM (4 years ago)
Author:
eric.carlson@apple.com
Message:

UserMediaController::from(document) can return nullptr
https://bugs.webkit.org/show_bug.cgi?id=203977
<rdar://problem/56908013>

Reviewed by Jer Noble.

  • Modules/mediastream/MediaDevices.cpp:

(WebCore::MediaDevices::stop): NULL-check the UserMediaController.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r252206 r252207  
     12019-11-07  Eric Carlson  <eric.carlson@apple.com>
     2
     3        UserMediaController::from(document) can return nullptr
     4        https://bugs.webkit.org/show_bug.cgi?id=203977
     5        <rdar://problem/56908013>
     6
     7        Reviewed by Jer Noble.
     8
     9        * Modules/mediastream/MediaDevices.cpp:
     10        (WebCore::MediaDevices::stop): NULL-check the UserMediaController.
     11
    1122019-11-07  Chris Dumez  <cdumez@apple.com>
    213
  • trunk/Source/WebCore/Modules/mediastream/MediaDevices.cpp

    r252046 r252207  
    7676    if (m_deviceChangeToken) {
    7777        auto* controller = UserMediaController::from(document()->page());
    78         controller->removeDeviceChangeObserver(m_deviceChangeToken);
     78        if (controller)
     79            controller->removeDeviceChangeObserver(m_deviceChangeToken);
    7980    }
    8081    m_devices.clear();
Note: See TracChangeset for help on using the changeset viewer.