mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 828176 - Make RasterImage::GetURIString work again. r=joe
This commit is contained in:
parent
a8989333ee
commit
fcd0c77a69
@ -102,7 +102,7 @@ Decoder::Finish(RasterImage::eShutdownIntent aShutdownIntent)
|
||||
|
||||
if (consoleService && errorObject && !HasDecoderError()) {
|
||||
nsAutoString msg(NS_LITERAL_STRING("Image corrupt or truncated: ") +
|
||||
NS_ConvertASCIItoUTF16(mImage.GetURIString()));
|
||||
NS_ConvertUTF8toUTF16(mImage.GetURIString()));
|
||||
|
||||
if (NS_SUCCEEDED(errorObject->InitWithWindowID(
|
||||
msg,
|
||||
|
@ -2811,7 +2811,7 @@ RasterImage::RequestDecodeCore(RequestDecodeType aDecodeType)
|
||||
// large images will decode a bit and post themselves to the event loop
|
||||
// to finish decoding.
|
||||
if (!mDecoded && !mInDecoder && mHasSourceData && aDecodeType == SOMEWHAT_SYNCHRONOUS) {
|
||||
SAMPLE_LABEL_PRINTF("RasterImage", "DecodeABitOf", "%s", GetURIString());
|
||||
SAMPLE_LABEL_PRINTF("RasterImage", "DecodeABitOf", "%s", GetURIString().get());
|
||||
DecodeWorker::Singleton()->DecodeABitOf(this);
|
||||
return NS_OK;
|
||||
}
|
||||
@ -2830,7 +2830,7 @@ RasterImage::SyncDecode()
|
||||
{
|
||||
nsresult rv;
|
||||
|
||||
SAMPLE_LABEL_PRINTF("RasterImage", "SyncDecode", "%s", GetURIString());;
|
||||
SAMPLE_LABEL_PRINTF("RasterImage", "SyncDecode", "%s", GetURIString().get());;
|
||||
|
||||
// If we're decoded already, no worries
|
||||
if (mDecoded)
|
||||
|
@ -290,7 +290,13 @@ public:
|
||||
kDisposeRestorePrevious // Restore the previous (composited) frame
|
||||
};
|
||||
|
||||
const char* GetURIString() { return mURIString.get();}
|
||||
nsCString GetURIString() {
|
||||
nsCString spec;
|
||||
if (GetURI()) {
|
||||
GetURI()->GetSpec(spec);
|
||||
}
|
||||
return spec;
|
||||
}
|
||||
|
||||
// Called from module startup. Sets up RasterImage to be used.
|
||||
static void Initialize();
|
||||
@ -647,7 +653,6 @@ private: // data
|
||||
// Source data members
|
||||
FallibleTArray<char> mSourceData;
|
||||
nsCString mSourceDataMimeType;
|
||||
nsCString mURIString;
|
||||
|
||||
friend class DiscardTracker;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user