@@ -1613,13 +1613,14 @@ UniquePtr<uint8_t[]> gfxUtils::GetImageBuffer(gfx::DataSourceSurface* aSurface,
16131613/* static */
16141614UniquePtr<uint8_t []> gfxUtils::GetImageBufferWithRandomNoise (
16151615 gfx::DataSourceSurface* aSurface, bool aIsAlphaPremultiplied,
1616- nsICookieJarSettings* aCookieJarSettings, int32_t * outFormat) {
1616+ nsICookieJarSettings* aCookieJarSettings, nsIPrincipal* aPrincipal,
1617+ int32_t * outFormat) {
16171618 UniquePtr<uint8_t []> imageBuffer =
16181619 GetImageBuffer (aSurface, aIsAlphaPremultiplied, outFormat);
16191620
16201621 nsRFPService::RandomizePixels (
1621- aCookieJarSettings, imageBuffer.get (), aSurface-> GetSize (). width ,
1622- aSurface->GetSize ().height ,
1622+ aCookieJarSettings, aPrincipal, imageBuffer.get (),
1623+ aSurface->GetSize ().width , aSurface-> GetSize (). height ,
16231624 aSurface->GetSize ().width * aSurface->GetSize ().height * 4 ,
16241625 SurfaceFormat::A8R8G8B8_UINT32);
16251626
@@ -1651,7 +1652,8 @@ nsresult gfxUtils::GetInputStream(gfx::DataSourceSurface* aSurface,
16511652nsresult gfxUtils::GetInputStreamWithRandomNoise (
16521653 gfx::DataSourceSurface* aSurface, bool aIsAlphaPremultiplied,
16531654 const char * aMimeType, const nsAString& aEncoderOptions,
1654- nsICookieJarSettings* aCookieJarSettings, nsIInputStream** outStream) {
1655+ nsICookieJarSettings* aCookieJarSettings, nsIPrincipal* aPrincipal,
1656+ nsIInputStream** outStream) {
16551657 nsCString enccid (" @mozilla.org/image/encoder;2?type=" );
16561658 enccid += aMimeType;
16571659 nsCOMPtr<imgIEncoder> encoder = do_CreateInstance (enccid.get ());
@@ -1667,8 +1669,8 @@ nsresult gfxUtils::GetInputStreamWithRandomNoise(
16671669 }
16681670
16691671 nsRFPService::RandomizePixels (
1670- aCookieJarSettings, imageBuffer.get (), aSurface-> GetSize (). width ,
1671- aSurface->GetSize ().height ,
1672+ aCookieJarSettings, aPrincipal, imageBuffer.get (),
1673+ aSurface->GetSize ().width , aSurface-> GetSize (). height ,
16721674 aSurface->GetSize ().width * aSurface->GetSize ().height * 4 ,
16731675 SurfaceFormat::A8R8G8B8_UINT32);
16741676
0 commit comments