diff --git a/js/public/Utility.h b/js/public/Utility.h index 318b80298..4ee6cce65 100644 --- a/js/public/Utility.h +++ b/js/public/Utility.h @@ -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)...) \ : nullptr; \ }