void SetMediaKeysHandler::finish() { WTF_LOG(Media, "SetMediaKeysHandler::finish"); HTMLMediaElementEncryptedMedia& thisElement = HTMLMediaElementEncryptedMedia::from(*m_element); // 3.4 Set the mediaKeys attribute to mediaKeys. if (thisElement.m_mediaKeys) thisElement.m_mediaKeys->clearMediaElement(); thisElement.m_mediaKeys = m_newMediaKeys; if (m_madeReservation) m_newMediaKeys->acceptReservation(); // 3.5 Resolve promise with undefined. resolve(); }