Bug 719776 - Part 4: Do not depend upon mozalloc inside Azure. r=jrmuizel

This commit is contained in:
Bas Schouten 2012-04-12 02:03:07 +02:00
Родитель 0dab5dbad2
Коммит 6acf8b6968
1 изменённых файлов: 6 добавлений и 2 удалений

Просмотреть файл

@ -39,7 +39,7 @@
#define MOZILLA_GFX_USERDATA_H_
#include <stdlib.h>
#include "mozilla/mozalloc.h"
#include "mozilla/Assertions.h"
namespace mozilla {
namespace gfx {
@ -65,7 +65,11 @@ public:
// but that would propagate an stl dependency out which we'd rather not
// do (see bug 666609). Plus, the entries array is expect to stay small
// so doing a realloc everytime we add a new entry shouldn't be too costly
entries = static_cast<Entry*>(moz_xrealloc(entries, sizeof(Entry)*(count+1)));
entries = static_cast<Entry*>(realloc(entries, sizeof(Entry)*(count+1)));
if (!entries) {
MOZ_CRASH();
}
entries[count].key = key;
entries[count].userData = userData;