mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 23:31:56 +00:00
bug 551098 - windows mobile crashes on start up since xmalloc landing r=cjones
This commit is contained in:
parent
4e51434fc9
commit
daab44389b
@ -39,8 +39,6 @@
|
||||
#include "include/mozce_shunt.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "mozilla/mozalloc_macro_wrappers.h" /* infallible malloc */
|
||||
|
||||
#ifdef MOZ_MEMORY
|
||||
|
||||
// declare the nothrow object
|
||||
@ -49,8 +47,6 @@ const std::nothrow_t std::nothrow;
|
||||
char*
|
||||
_strndup(const char *src, size_t len) {
|
||||
char* dst = (char*)malloc(len + 1);
|
||||
// FIXME/bug 507249: no need to null-check when infallible
|
||||
// allocators are used
|
||||
if(dst)
|
||||
strncpy(dst, src, len + 1);
|
||||
return dst;
|
||||
@ -66,8 +62,6 @@ _strdup(const char *src) {
|
||||
wchar_t *
|
||||
_wcsndup(const wchar_t *src, size_t len) {
|
||||
wchar_t* dst = (wchar_t*)malloc(sizeof(wchar_t) * (len + 1));
|
||||
// FIXME/bug 507249: no need to null-check when infallible
|
||||
// allocators are used
|
||||
if(dst)
|
||||
wcsncpy(dst, src, len + 1);
|
||||
return dst;
|
||||
|
@ -47,6 +47,11 @@ ifdef MOZ_MEMORY
|
||||
DIRS += jemalloc
|
||||
endif
|
||||
|
||||
ifdef WINCE
|
||||
# mozalloc depends on the shunt
|
||||
DIRS += $(DEPTH)/build/wince/shunt
|
||||
endif
|
||||
|
||||
DIRS += mozalloc
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
@ -51,10 +51,8 @@ FORCE_SHARED_LIB= 1
|
||||
DIST_INSTALL = 1
|
||||
|
||||
ifeq (,$(filter-out WINCE,$(OS_ARCH)))
|
||||
# The wince shunt relies on this library in a somewhat complicated
|
||||
# way. In wince builds, jemalloc replaces the wince libc allocators
|
||||
# and moz_* will end up using those symbols at run time.
|
||||
export NO_SHUNT = 1
|
||||
# mozalloc gets its allocation methods from the shunt, which gets their
|
||||
# implementation by direcly linking with jemalloc.obj
|
||||
OS_LIBS =
|
||||
endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user