зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1374024 - add static-analysis annotation for methods that return dangling pointers. r=mystor
MozReview-Commit-ID: KE4a4W0Du3I
This commit is contained in:
Родитель
14eb685f4f
Коммит
145fe29dbe
|
@ -109,9 +109,9 @@ public:
|
|||
*/
|
||||
|
||||
#if defined(CharT_is_PRUnichar) && defined(MOZ_USE_CHAR16_WRAPPER)
|
||||
char16ptr_t get() const
|
||||
MOZ_NO_DANGLING_ON_TEMPORARIES char16ptr_t get() const
|
||||
#else
|
||||
const char_type* get() const
|
||||
MOZ_NO_DANGLING_ON_TEMPORARIES const char_type* get() const
|
||||
#endif
|
||||
{
|
||||
return mData;
|
||||
|
@ -732,9 +732,9 @@ public:
|
|||
|
||||
// return nullptr if we are voided
|
||||
#if defined(CharT_is_PRUnichar) && defined(MOZ_USE_CHAR16_WRAPPER)
|
||||
char16ptr_t get() const
|
||||
MOZ_NO_DANGLING_ON_TEMPORARIES char16ptr_t get() const
|
||||
#else
|
||||
const char_type* get() const
|
||||
MOZ_NO_DANGLING_ON_TEMPORARIES const char_type* get() const
|
||||
#endif
|
||||
{
|
||||
return (mDataFlags & DataFlags::VOIDED) ? nullptr : mData;
|
||||
|
|
Загрузка…
Ссылка в новой задаче