Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(342)

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLMediaElement.cpp

Issue 2594353003: Crash in blink::beforeCallEnteredCallback() (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights
3 * reserved. 3 * reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 785 matching lines...) Expand 10 before | Expand all | Expand 10 after
796 796
797 DCHECK(!m_paused || m_playPromiseResolvers.isEmpty()); 797 DCHECK(!m_paused || m_playPromiseResolvers.isEmpty());
798 798
799 // 4.6 - If the paused attribute is false, then run these substeps 799 // 4.6 - If the paused attribute is false, then run these substeps
800 if (!m_paused) { 800 if (!m_paused) {
801 // 4.6.1 - Set the paused attribute to true. 801 // 4.6.1 - Set the paused attribute to true.
802 m_paused = true; 802 m_paused = true;
803 803
804 // 4.6.2 - Take pending play promises and reject pending play promises 804 // 4.6.2 - Take pending play promises and reject pending play promises
805 // with the result and an "AbortError" DOMException. 805 // with the result and an "AbortError" DOMException.
806 rejectPlayPromises( 806 if (!ScriptForbiddenScope::isScriptForbidden()) {
mlamouri (slow - plz ping) 2016/12/23 12:00:26 Why is the script forbidden here?
Anton Obzhirov 2017/01/09 15:35:54 Plz check https://cs.chromium.org/chromium/src/thi
807 AbortError, 807 rejectPlayPromises(
808 "The play() request was interrupted by a new load request."); 808 AbortError,
809 "The play() request was interrupted by a new load request.");
810 } else {
811 scheduleRejectPlayPromises(AbortError);
foolip 2017/01/04 15:49:00 It's fairly likely that it's still forbidden in a
Anton Obzhirov 2017/01/09 15:35:54 I see, will remove it.
haraken 2017/01/21 01:49:13 scheduleRejectPlayPromises schedules a task on a n
Anton Obzhirov 2017/01/21 20:30:58 It seemed to work in this particular case, I mean
812 }
809 } 813 }
810 814
811 // 4.7 - If seeking is true, set it to false. 815 // 4.7 - If seeking is true, set it to false.
812 m_seeking = false; 816 m_seeking = false;
813 817
814 // 4.8 - Set the current playback position to 0. 818 // 4.8 - Set the current playback position to 0.
815 // Set the official playback position to 0. 819 // Set the official playback position to 0.
816 // If this changed the official playback position, then queue a task 820 // If this changed the official playback position, then queue a task
817 // to fire a simple event named timeupdate at the media element. 821 // to fire a simple event named timeupdate at the media element.
818 // 4.9 - Set the initial playback position to 0. 822 // 4.9 - Set the initial playback position to 0.
(...skipping 3287 matching lines...) Expand 10 before | Expand all | Expand 10 after
4106 kMostlyFillViewportBecomeStableSeconds, BLINK_FROM_HERE); 4110 kMostlyFillViewportBecomeStableSeconds, BLINK_FROM_HERE);
4107 } 4111 }
4108 4112
4109 void HTMLMediaElement::viewportFillDebouncerTimerFired(TimerBase*) { 4113 void HTMLMediaElement::viewportFillDebouncerTimerFired(TimerBase*) {
4110 m_mostlyFillingViewport = true; 4114 m_mostlyFillingViewport = true;
4111 if (m_webMediaPlayer) 4115 if (m_webMediaPlayer)
4112 m_webMediaPlayer->becameDominantVisibleContent(m_mostlyFillingViewport); 4116 m_webMediaPlayer->becameDominantVisibleContent(m_mostlyFillingViewport);
4113 } 4117 }
4114 4118
4115 } // namespace blink 4119 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698