mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 881018 - Crash when TiledLayerBuffer::GetScaledTileLength returns 0; r=cwiiis
This commit is contained in:
parent
eb22575f8c
commit
c16d2bf628
@ -111,7 +111,16 @@ public:
|
||||
bool RemoveTile(int x, int y, Tile& aRemovedTile);
|
||||
|
||||
uint16_t GetTileLength() const { return TILEDLAYERBUFFER_TILE_SIZE; }
|
||||
uint32_t GetScaledTileLength() const { return TILEDLAYERBUFFER_TILE_SIZE / mResolution; }
|
||||
uint32_t GetScaledTileLength() const {
|
||||
// volatile variables to help investigate bug 881018
|
||||
volatile float resolution = mResolution;
|
||||
volatile float fScaledLength = TILEDLAYERBUFFER_TILE_SIZE / mResolution;
|
||||
volatile uint32_t uiScaledLength = TILEDLAYERBUFFER_TILE_SIZE / mResolution;
|
||||
if (!uiScaledLength) {
|
||||
MOZ_CRASH();
|
||||
}
|
||||
return uiScaledLength;
|
||||
}
|
||||
|
||||
unsigned int GetTileCount() const { return mRetainedTiles.Length(); }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user