Commit 2289b26f authored by philipj@opera.com's avatar philipj@opera.com

Remove traces of beforeload in HTMLMediaElement

There now remain no places in HTMLMediaElement where events are
dispatched synchronously, so there's no need to protect(this). For the
same reason, the ASSERT is irrelevant, even if it holds true.

BUG=none

Review URL: https://codereview.chromium.org/213343002

git-svn-id: svn://svn.chromium.org/blink/trunk@170123 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 44da6b32
......@@ -526,8 +526,6 @@ void HTMLMediaElement::scheduleEvent(PassRefPtr<Event> event)
void HTMLMediaElement::loadTimerFired(Timer<HTMLMediaElement>*)
{
RefPtr<HTMLMediaElement> protect(this); // loadNextSourceChild may fire 'beforeload', which can make arbitrary DOM mutations.
if (RuntimeEnabledFeatures::videoTrackEnabled() && (m_pendingActionFlags & LoadTextTrackResource))
configureTextTracks();
......@@ -585,8 +583,6 @@ String HTMLMediaElement::canPlayType(const String& mimeType, const String& keySy
void HTMLMediaElement::load()
{
RefPtr<HTMLMediaElement> protect(this); // loadInternal may result in a 'beforeload' event, which can make arbitrary DOM mutations.
WTF_LOG(Media, "HTMLMediaElement::load()");
if (UserGestureIndicator::processingUserGesture())
......@@ -705,9 +701,6 @@ void HTMLMediaElement::prepareForLoad()
void HTMLMediaElement::loadInternal()
{
// FIXME: Now that we don't have beforeload events we should make this ASSERT the opposite.
ASSERT(!NoEventDispatchAssertion::isEventDispatchForbidden());
// HTMLMediaElement::textTracksAreReady will need "... the text tracks whose mode was not in the
// disabled state when the element's resource selection algorithm last started".
if (RuntimeEnabledFeatures::videoTrackEnabled()) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment