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

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

Issue 1495533002: Robustify state-transitions in HTMLMediaElement::startDeferredLoad (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix expectation. Created 5 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
« no previous file with comments | « third_party/WebKit/LayoutTests/media/video-preload-none-to-metadata-after-load-crash-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 1098 matching lines...) Expand 10 before | Expand all | Expand 10 after
1109 1109
1110 startPlayerLoad(); 1110 startPlayerLoad();
1111 } 1111 }
1112 1112
1113 void HTMLMediaElement::startDeferredLoad() 1113 void HTMLMediaElement::startDeferredLoad()
1114 { 1114 {
1115 if (m_deferredLoadState == WaitingForTrigger) { 1115 if (m_deferredLoadState == WaitingForTrigger) {
1116 executeDeferredLoad(); 1116 executeDeferredLoad();
1117 return; 1117 return;
1118 } 1118 }
1119 if (m_deferredLoadState == ExecuteOnStopDelayingLoadEventTask)
1120 return;
1119 ASSERT(m_deferredLoadState == WaitingForStopDelayingLoadEventTask); 1121 ASSERT(m_deferredLoadState == WaitingForStopDelayingLoadEventTask);
1120 m_deferredLoadState = ExecuteOnStopDelayingLoadEventTask; 1122 m_deferredLoadState = ExecuteOnStopDelayingLoadEventTask;
1121 } 1123 }
1122 1124
1123 void HTMLMediaElement::deferredLoadTimerFired(Timer<HTMLMediaElement>*) 1125 void HTMLMediaElement::deferredLoadTimerFired(Timer<HTMLMediaElement>*)
1124 { 1126 {
1125 setShouldDelayLoadEvent(false); 1127 setShouldDelayLoadEvent(false);
1126 1128
1127 if (m_deferredLoadState == ExecuteOnStopDelayingLoadEventTask) { 1129 if (m_deferredLoadState == ExecuteOnStopDelayingLoadEventTask) {
1128 executeDeferredLoad(); 1130 executeDeferredLoad();
(...skipping 2543 matching lines...) Expand 10 before | Expand all | Expand 10 after
3672 visitor->trace(m_client); 3674 visitor->trace(m_client);
3673 } 3675 }
3674 3676
3675 DEFINE_TRACE(HTMLMediaElement::AudioSourceProviderImpl) 3677 DEFINE_TRACE(HTMLMediaElement::AudioSourceProviderImpl)
3676 { 3678 {
3677 visitor->trace(m_client); 3679 visitor->trace(m_client);
3678 } 3680 }
3679 #endif 3681 #endif
3680 3682
3681 } 3683 }
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/media/video-preload-none-to-metadata-after-load-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698