RESOLVED FIXED 281595
Typo in error message for WTF::makeUnique functions
https://bugs.webkit.org/show_bug.cgi?id=281595
Summary Typo in error message for WTF::makeUnique functions
Abrar Rahman Protyasha
Reported 2024-10-16 11:03:27 PDT
This is the diff with the corrected spellings: ``` diff --git a/Source/WTF/wtf/StdLibExtras.h b/Source/WTF/wtf/StdLibExtras.h index 42cfdebd9e82..1aebedcf1618 100644 --- a/Source/WTF/wtf/StdLibExtras.h +++ b/Source/WTF/wtf/StdLibExtras.h @@ -716,7 +716,7 @@ public: template<class T, class... Args> ALWAYS_INLINE decltype(auto) makeUnique(Args&&... args) { - static_assert(std::is_same<typename T::WTFIsFastAllocated, int>::value, "T sould use FastMalloc (WTF_MAKE_FAST_ALLOCATED)"); + static_assert(std::is_same<typename T::WTFIsFastAllocated, int>::value, "T should use FastMalloc (WTF_MAKE_FAST_ALLOCATED)"); static_assert(!TypeHasRefMemberFunction<T>::value, "T should not be RefCounted"); return std::make_unique<T>(std::forward<Args>(args)...); } @@ -724,7 +724,7 @@ ALWAYS_INLINE decltype(auto) makeUnique(Args&&... args) template<class T, class... Args> ALWAYS_INLINE decltype(auto) makeUniqueWithoutRefCountedCheck(Args&&... args) { - static_assert(std::is_same<typename T::WTFIsFastAllocated, int>::value, "T sould use FastMalloc (WTF_MAKE_FAST_ALLOCATED)"); + static_assert(std::is_same<typename T::WTFIsFastAllocated, int>::value, "T should use FastMalloc (WTF_MAKE_FAST_ALLOCATED)"); return std::make_unique<T>(std::forward<Args>(args)...); } diff --git a/Source/WTF/wtf/UniqueRef.h b/Source/WTF/wtf/UniqueRef.h index 4807652fe145..364affae782c 100644 --- a/Source/WTF/wtf/UniqueRef.h +++ b/Source/WTF/wtf/UniqueRef.h @@ -43,7 +43,7 @@ UniqueRef<T> makeUniqueRefWithoutFastMallocCheck(Args&&... args) template<typename T, class... Args> UniqueRef<T> makeUniqueRef(Args&&... args) { - static_assert(std::is_same<typename T::WTFIsFastAllocated, int>::value, "T sould use FastMalloc (WTF_MAKE_FAST_ALLOCATED)"); + static_assert(std::is_same<typename T::WTFIsFastAllocated, int>::value, "T should use FastMalloc (WTF_MAKE_FAST_ALLOCATED)"); return makeUniqueRefWithoutFastMallocCheck<T>(std::forward<Args>(args)...); } ```
Attachments
Alexsander Borges Damaceno
Comment 1 2024-12-23 23:07:52 PST
Radar WebKit Bug Importer
Comment 2 2024-12-23 23:08:00 PST
EWS
Comment 3 2024-12-24 12:18:46 PST
Committed 288280@main (99bc8a878edb): <https://commits.webkit.org/288280@main> Reviewed commits have been landed. Closing PR #38361 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.