mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 19:04:45 +00:00
Bug 1145702 - Make the assertion in Axis::GetOverscroll() more informative. r=Cwiiis
--HG-- extra : source : 9384f096b94ec51b5140699e60b26b611fa05fd2
This commit is contained in:
parent
14f75f943c
commit
61cf0d4e08
@ -206,7 +206,14 @@ ParentLayerCoord Axis::GetOverscroll() const {
|
||||
ParentLayerCoord result = (mOverscroll - mLastOverscrollPeak) / mOverscrollScale;
|
||||
|
||||
// Assert that we return overscroll in the correct direction
|
||||
MOZ_ASSERT((result.value * mFirstOverscrollAnimationSample.value) >= 0.0f);
|
||||
#ifdef DEBUG
|
||||
if ((result.value * mFirstOverscrollAnimationSample.value) < 0.0f) {
|
||||
nsPrintfCString message("GetOverscroll() (%f) and first overscroll animation sample (%f) have different signs\n",
|
||||
result.value, mFirstOverscrollAnimationSample.value);
|
||||
NS_ASSERTION(false, message.get());
|
||||
MOZ_CRASH();
|
||||
}
|
||||
#endif
|
||||
|
||||
return result;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user