Changeset 233574 in webkit
- Timestamp:
- Jul 6, 2018, 3:10:50 AM (8 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
page/animation/AnimationBase.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r233572 r233574 1 2018-07-06 Frederic Wang <fwang@igalia.com> 2 3 [Crash] Illegal use of uninitialized std::optional value in WebCore::AnimationBase::updateStateMachine 4 https://bugs.webkit.org/show_bug.cgi?id=187382 5 6 Reviewed by Carlos Garcia Campos. 7 8 WebCore::AnimationBase::updateStateMachine has two potential places where the use of an 9 uninitialized std:optional value is possible and one of them is hit when using Google drive. 10 Since that old animation code is going to be removed soon, we just quickly patch this issue 11 via value_or() so that we can restore the ASSERT added in bug 186536. 12 13 No new tests, code is going to be removed soon. 14 15 * page/animation/AnimationBase.cpp: 16 (WebCore::AnimationBase::updateStateMachine): Use value_or(0) to avoid potential crashes. 17 1 18 2018-07-06 Frederic Wang <fwang@igalia.com> 2 19 -
trunk/Source/WebCore/page/animation/AnimationBase.cpp
r232178 r233574 380 380 ASSERT(paused()); 381 381 // Update the times 382 m_startTime = m_startTime.value () + beginAnimationUpdateTime() - m_pauseTime.value_or(0);382 m_startTime = m_startTime.value_or(0) + beginAnimationUpdateTime() - m_pauseTime.value_or(0); 383 383 m_pauseTime = std::nullopt; 384 384 … … 412 412 // Update the times 413 413 if (m_animationState == AnimationState::PausedRun) 414 m_startTime = m_startTime.value () + beginAnimationUpdateTime() - m_pauseTime.value_or(0);414 m_startTime = m_startTime.value_or(0) + beginAnimationUpdateTime() - m_pauseTime.value_or(0); 415 415 else 416 416 m_startTime = 0;
Note:
See TracChangeset
for help on using the changeset viewer.