зеркало из https://github.com/mozilla/gecko-dev.git
Bug 881018 - Crash when TiledLayerBuffer::GetScaledTileLength returns 0; r=cwiiis
This commit is contained in:
Родитель
4c40f10fab
Коммит
c44be3735b
|
@ -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(); }
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче