Backed out changeset 25ea9ac37380 (bug 828176) for crashes.

This commit is contained in:
Ryan VanderMeulen 2013-01-30 18:16:09 -05:00
parent 5fc9bf313e
commit dc16d1fd40
3 changed files with 5 additions and 8 deletions

View File

@ -102,7 +102,7 @@ Decoder::Finish(RasterImage::eShutdownIntent aShutdownIntent)
if (consoleService && errorObject && !HasDecoderError()) {
nsAutoString msg(NS_LITERAL_STRING("Image corrupt or truncated: ") +
NS_ConvertUTF8toUTF16(mImage.GetURIString()));
NS_ConvertASCIItoUTF16(mImage.GetURIString()));
if (NS_SUCCEEDED(errorObject->InitWithWindowID(
msg,

View File

@ -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().get());
SAMPLE_LABEL_PRINTF("RasterImage", "DecodeABitOf", "%s", GetURIString());
DecodeWorker::Singleton()->DecodeABitOf(this);
return NS_OK;
}
@ -2830,7 +2830,7 @@ RasterImage::SyncDecode()
{
nsresult rv;
SAMPLE_LABEL_PRINTF("RasterImage", "SyncDecode", "%s", GetURIString().get());;
SAMPLE_LABEL_PRINTF("RasterImage", "SyncDecode", "%s", GetURIString());;
// If we're decoded already, no worries
if (mDecoded)

View File

@ -290,11 +290,7 @@ public:
kDisposeRestorePrevious // Restore the previous (composited) frame
};
nsCString GetURIString() {
nsAutoCString spec;
GetURI()->GetSpec(spec);
return spec;
}
const char* GetURIString() { return mURIString.get();}
// Called from module startup. Sets up RasterImage to be used.
static void Initialize();
@ -651,6 +647,7 @@ private: // data
// Source data members
FallibleTArray<char> mSourceData;
nsCString mSourceDataMimeType;
nsCString mURIString;
friend class DiscardTracker;