Bug 841154: Add a sample label for image decoding. r=khuey

This commit is contained in:
Chris Jones 2013-02-13 13:49:57 -08:00
parent 3341c103d7
commit c0817a354e

View File

@ -8,6 +8,7 @@
#include "nsIServiceManager.h"
#include "nsIConsoleService.h"
#include "nsIScriptError.h"
#include "sampler.h"
namespace mozilla {
namespace image {
@ -67,6 +68,8 @@ Decoder::InitSharedDecoder()
void
Decoder::Write(const char* aBuffer, uint32_t aCount)
{
SAMPLE_LABEL("ImageDecoder", "Write");
// We're strict about decoder errors
NS_ABORT_IF_FALSE(!HasDecoderError(),
"Not allowed to make more decoder calls after error!");