mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1080994 - Build libclearkey without a dependency on mozalloc or mozglue. r=dkeeler,r=cpearce
This commit is contained in:
parent
4ff46e2327
commit
bc934346c7
@ -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