mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
Bug 1080994 - Build libclearkey without a dependency on mozalloc or mozglue. r=dkeeler,r=cpearce
This commit is contained in:
parent
7dfc0f99b9
commit
951b27b2b0
@ -10,4 +10,6 @@ CLEARKEY_CDM_FILES = \
|
||||
clearkey.info \
|
||||
$(NULL)
|
||||
|
||||
MOZ_GLUE_LDFLAGS =
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
@ -20,4 +20,6 @@ LOCAL_INCLUDES += [
|
||||
]
|
||||
|
||||
USE_STATIC_LIBS = True
|
||||
USE_LIBS += [ 'mozalloc' ]
|
||||
|
||||
DISABLE_STL_WRAPPING = True
|
||||
DEFINES['MOZ_NO_MOZALLOC'] = True
|
||||
|
@ -11,7 +11,9 @@
|
||||
|
||||
#include "NSSErrorsService.h"
|
||||
#include "mozilla/Likely.h"
|
||||
#ifndef MOZ_NO_MOZALLOC
|
||||
#include "mozilla/mozalloc_oom.h"
|
||||
#endif
|
||||
#include "mozilla/Scoped.h"
|
||||
#include "nsError.h"
|
||||
#include "nsDebug.h"
|
||||
@ -257,8 +259,11 @@ inline void
|
||||
SECITEM_AllocItem(SECItem & item, uint32_t len)
|
||||
{
|
||||
if (MOZ_UNLIKELY(!SECITEM_AllocItem(nullptr, &item, len))) {
|
||||
#ifndef MOZ_NO_MOZALLOC
|
||||
mozalloc_handle_oom(len);
|
||||
if (MOZ_UNLIKELY(!SECITEM_AllocItem(nullptr, &item, len))) {
|
||||
if (MOZ_UNLIKELY(!SECITEM_AllocItem(nullptr, &item, len)))
|
||||
#endif
|
||||
{
|
||||
MOZ_CRASH();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user