Bug 1187401 (Part 2) - Eliminate the nsresult return value from RasterImage::SetMetadata, since it's not used anymore. r=tn

--HG--
extra : rebase_source : dc15e712deda9fe140cb1adc1c88b0c968307852
This commit is contained in:
Seth Fowler 2015-08-18 10:19:26 -07:00
parent 1d1efc009f
commit be0cccfa8a
2 changed files with 5 additions and 7 deletions

View File

@ -942,20 +942,20 @@ RasterImage::OnAddedFrame(uint32_t aNewFrameCount,
}
}
nsresult
void
RasterImage::SetMetadata(const ImageMetadata& aMetadata,
bool aFromMetadataDecode)
{
MOZ_ASSERT(NS_IsMainThread());
if (mError) {
return NS_ERROR_FAILURE;
return;
}
if (aMetadata.HasSize()) {
IntSize size = aMetadata.GetSize();
if (size.width < 0 || size.height < 0) {
return NS_ERROR_INVALID_ARG;
return;
}
MOZ_ASSERT(aMetadata.HasOrientation());
@ -966,7 +966,7 @@ RasterImage::SetMetadata(const ImageMetadata& aMetadata,
NS_WARNING("Image changed size or orientation on redecode! "
"This should not happen!");
DoError();
return NS_ERROR_UNEXPECTED;
return;
}
// Set the size and flag that we have it.
@ -1010,8 +1010,6 @@ RasterImage::SetMetadata(const ImageMetadata& aMetadata,
Set("hotspotX", intwrapx);
Set("hotspotY", intwrapy);
}
return NS_OK;
}
NS_IMETHODIMP

View File

@ -327,7 +327,7 @@ private:
* @param aFromMetadataDecode True if this metadata came from a metadata
* decode; false if it came from a full decode.
*/
nsresult SetMetadata(const ImageMetadata& aMetadata, bool aFromMetadataDecode);
void SetMetadata(const ImageMetadata& aMetadata, bool aFromMetadataDecode);
/**
* In catastrophic circumstances like a GPU driver crash, the contents of our