| Index: third_party/WebKit/Source/core/frame/VisualViewport.cpp
|
| diff --git a/third_party/WebKit/Source/core/frame/VisualViewport.cpp b/third_party/WebKit/Source/core/frame/VisualViewport.cpp
|
| index 71388154af98c38a5efdfa1ff1c72483ab7d6d24..f960a6b3073e64ebc26b97ad15b0f1c886b663e3 100644
|
| --- a/third_party/WebKit/Source/core/frame/VisualViewport.cpp
|
| +++ b/third_party/WebKit/Source/core/frame/VisualViewport.cpp
|
| @@ -250,6 +250,8 @@ bool VisualViewport::didSetScaleOrLocation(float scale,
|
|
|
| bool valuesChanged = false;
|
|
|
| + CHECK(!std::isnan(scale));
|
| + CHECK(std::isfinite(scale));
|
| if (scale != m_scale) {
|
| m_scale = scale;
|
| valuesChanged = true;
|
| @@ -259,6 +261,10 @@ bool VisualViewport::didSetScaleOrLocation(float scale,
|
|
|
| ScrollOffset clampedOffset = clampScrollOffset(toScrollOffset(location));
|
|
|
| + CHECK(!std::isnan(clampedOffset.width()) &&
|
| + !std::isnan(clampedOffset.height()));
|
| + CHECK(std::isfinite(clampedOffset.width()) &&
|
| + std::isfinite(clampedOffset.height()));
|
| if (clampedOffset != m_offset) {
|
| m_offset = clampedOffset;
|
| scrollAnimator().setCurrentOffset(m_offset);
|
|
|