This commit is contained in:
Cameron Kaiser 2017-05-12 11:19:41 -07:00
parent 3c5d4bab84
commit a6a0b895f1
1 changed files with 1 additions and 1 deletions

View File

@ -291,7 +291,7 @@ static inline char* js_strdup(const char* s)
QUALIFIERS T * \
NEWNAME(Args&&... args) MOZ_HEAP_ALLOCATOR { \
void* memory = ALLOCATOR(sizeof(T)); \
return memory \
return MOZ_LIKELY(memory) \
? new(memory) T(mozilla::Forward<Args>(args)...) \
: nullptr; \
}