Граф коммитов

97 Коммитов

Автор SHA1 Сообщение Дата
Tom Ritter 8dbe002119 Bug 1393538 Clean up unused variables in toolkit/ r=smaug
MozReview-Commit-ID: I6r50dqJJHJ

--HG--
extra : rebase_source : f1f773db8f0ec44c1cf6f194973f870b08f6138b
2017-08-24 15:07:59 -05:00
Benjamin Smedberg c2b9935278 Bug 1379254 - Add a @note to the documentation of MOZ_CRASH_UNSAFE_* to make clear data collection risk and requirements, r=erahm
MozReview-Commit-ID: KssgssWHTUX

--HG--
extra : rebase_source : 1daa52ebe00e594534f06463e45f98e50ab8a49a
2017-07-07 14:44:26 -04:00
Mike Hommey 05a36a133a Bug 1369622 - Add a static_assert when no variadic argument is given to MOZ_CRASH_UNSAFE_PRINTF. r=froydnj
If MOZ_CRASH_UNSAFE_PRINTF is only given a format string, it means
either arguments are missing, or MOZ_CRASH should be used instead.
Hint at that with a static_assert.

--HG--
extra : rebase_source : 355c37deb8b007e61939a4c657e411d110e7bbe7
2017-06-02 15:11:47 +09:00
Mike Hommey 8914ace4ce Bug 1369622 - Use MOZ_ARG_COUNT instead of MOZ_PASTE_PREFIX_AND_ARG_COUNT. r=froydnj
In a couple places, MOZ_PASTE_PREFIX_AND_ARG_COUNT is used to only count
the number of arguments, we can now use MOZ_ARG_COUNT directly for that.

--HG--
extra : rebase_source : 1064e4cc231863dc4aff83ee6bc90d318b4be418
2017-06-02 15:06:34 +09:00
Sylvestre Ledru e3c965eb6f Bug 1368079 - Enable the diagnostic assert when MOZ_DEV_EDITION is set r=froydnj,glandium
MozReview-Commit-ID: Dxi5jTGcrow

--HG--
extra : rebase_source : 959956094e6e64a50e307e48b11bb8791940d297
2017-06-05 23:47:02 +02:00
Mike Hommey c1becb4a54 Bug 1368932 - Allow MOZ_PASTE_PREFIX_AND_ARG_COUNT to work with 0 arguments. r=froydnj
At the same time, remove the MOZ_STATIC_ASSERT_VALID_ARG_COUNT, which
doesn't actually work for more than 50 arguments(*), and which is now not
useful to detect 0 arguments.

(*) the build fails, but not directly thanks to the static_assert it
expands to.

--HG--
extra : rebase_source : 8f0fe7b352c89b5a3ec87f42ef5464c370c362ef
2017-05-25 15:47:21 +09:00
Phil Ringnalda 18c2e05936 Backed out changeset df0ddb9c9bef (bug 1368079) for making DevEdition fail to build
MozReview-Commit-ID: BUE6UL0WiDW
2017-05-30 23:10:48 -07:00
Sylvestre Ledru 6ef28ca31d Bug 1368079 - Enable the diagnostic assert when MOZ_DEV_EDITION is set r=glandium
MozReview-Commit-ID: 1f6Kwne6zYf

--HG--
extra : rebase_source : 14f3697fe4ad7dcd356fdc1424ffc62f4ea9897b
2017-05-30 09:26:02 +02:00
Mike Hommey c59dbe56d2 Bug 1365460 - Define MOZ_DIAGNOSTIC_ASSERT_ENABLED when MOZ_DIAGNOSTIC_ASSERT does something. r=froydnj
--HG--
extra : rebase_source : 557203426da1804504588198e0f8bccb3232858e
2017-05-18 11:14:17 +09:00
Carsten "Tomcat" Book 824aad1190 Backed out changeset 19ea645f562e (bug 1357799) on request 2017-04-27 15:09:53 +02:00
Sylvestre Ledru 612d9ada4d Bug 1357799 - Enable the diagnostic assert during the beta staged roll out period r=bholley
MozReview-Commit-ID: KstUhJH0bAz

--HG--
extra : rebase_source : 799023c9a69b0fea86b0204efffe12b560baa6e3
2017-04-19 18:07:04 +02:00
Emanuel Hoogeveen 9c7c14c872 Bug 1338574 - Part 1: Add MOZ_CRASH_UNSAFE_OOL and MOZ_CRASH_UNSAFE_PRINTF to crash with a runtime generated explanation string. r=froydnj
--HG--
extra : rebase_source : 3ba633aa77ab96f763ea03a8308c539c9c2aeda0
2017-02-21 18:01:41 +01:00
Emanuel Hoogeveen 4308a12546 Bug 1338574 - Part 0: Pass __LINE__ as an argument to MOZ_REALLY_CRASH() instead of using it directly. r=froydnj
--HG--
extra : rebase_source : 1df7776a4627c4af417be78649ba22203dca8026
2017-02-21 18:01:38 +01:00
David Major e46dbc2c0f Bug 1324093 - Part 4: Make MOZ_Report{Crash,AssertionFailure} be MOZ_NEVER_INLINE. r=froydnj
You'd think that this would throw off the assertion stacks in nsTraceRefcnt::WalkTheStack. But as far as I can tell, it was already setting |skipFrames| too high!

On top of that, the function was getting out-of-lined in some instances already. It really should have been MOZ_ALWAYS_INLINE_EVEN_DEBUG.

MozReview-Commit-ID: J2FZmi0pKro

--HG--
extra : rebase_source : 20e5be9f8c21637a28435f47b8ab2de101825679
2017-01-18 09:37:54 +13:00
David Major 2166409a1d Bug 1324093 - Part 3: Don't MOZ_ReportAssertionFailure in non-debug builds. r=froydnj f=Waldo f=nbp
Not only does this trim the code, it also makes MOZ_RELEASE_ASSERT follow the advice of MOZ_CRASH earlier in the file:

 * If we're a DEBUG build and we crash at a MOZ_CRASH which provides an
 * explanation-string, we print the string to stderr.  Otherwise, we don't
 * print anything; this is because we want MOZ_CRASH to be 100% safe in release
 * builds, and it's hard to print to stderr safely when memory might have been
 * corrupted.

MozReview-Commit-ID: Kuxzn1v9Vfs

--HG--
extra : rebase_source : 5c6efe7cb9adb1c366b423d6ff8f95002512985c
2017-01-18 09:37:46 +13:00
David Major 77329182eb Bug 1324093 - Part 2: Don't AnnotateMozCrashReason on debug builds. r=bsmedberg
I left gMozCrashReason visible (but not meaningfully used) in all builds, in order to match the behavior of Assertions.cpp, and to avoid more #ifdef clutter in nsExceptionHandler.cpp.

MozReview-Commit-ID: smoFkddGzd

--HG--
extra : rebase_source : 498f927f62fc944edf254c2ff3b115131367a506
2017-01-18 09:34:02 +13:00
David Major dd8c1f9d4e Bug 1324093 - Part 1: Move MOZ_REALLY_CRASH's null-deref and TerminateProcess into a never-inline function. r=froydnj
The C versus C++ distinction was only there so that Android could make sure it used the global ::abort. I didn't see the need to maintain the distinction for Windows. (Besides, with this change we're no longer doing textual inclusion of "TerminateProcess" in the macro, so people can't take over the name.)

Linux's abort sequence wasn't long enough to be troublesome, so I left it alone.

MozReview-Commit-ID: Ah5XtWpevGz

--HG--
extra : rebase_source : 37c3fb4c50bcba8e48c6a965a02e3f8608940538
2017-01-18 09:33:25 +13:00
David Major d27150b889 Bug 1324093 - Part 0: Use MOZ_{BEGIN,END}_EXTERN_C in Assertions.h. r=froydnj
Drive-by cleanup.

MozReview-Commit-ID: 8slQlbS3NS2

--HG--
extra : rebase_source : 2df96c531b8cfa03ca17c134393c5f054ca25927
2017-01-18 09:32:47 +13:00
Jan de Mooij 2975885bae Bug 1283562 - Add mozilla::Result<V, E> for fallible return values. r=jwalden 2016-11-21 12:52:03 +01:00
Emanuel Hoogeveen 515f250ac5 Bug 1309573 - Part 1: Define the crash reason in MFBT to let everything use it. r=froydnj
--HG--
extra : rebase_source : 12eda091c0453e067a13a80261b814128d27c45c
2016-11-06 22:57:00 -05:00
Sebastian Hengst cdcc9e20da Bug 1304829 - rename RELEASE_BUILD to RELEASE_OR_BETA: main part. r=ted,Mossop
MozReview-Commit-ID: 1lCt0xTMV5O
2016-10-08 11:14:49 +02:00
Michael Layzell e1fc3b1773 Bug 1159244 - Add release mode bounds checking with custom annotations to nsTArray, r=froydnj
MozReview-Commit-ID: Ljx9PwBCyTT
2016-08-15 13:29:45 -04:00
Andi-Bogdan Postelnicu 79a0735001 Bug 1283395 - add markup functions for static analysis builds. r=froydnj
MozReview-Commit-ID: 6dFygYzTYfN
2016-07-25 16:57:30 +03:00
Wes Kocher 1feda59958 Backed out changeset 9c839b1d1397 (bug 1283395) for static build bustage CLOSED TREE 2016-07-25 08:54:47 -07:00
Andi-Bogdan Postelnicu 440264fed8 Bug 1283395 - add markup functions for static analysis builds. r=froydnj
MozReview-Commit-ID: 6dFygYzTYfN
2016-07-25 17:43:14 +03:00
Carsten "Tomcat" Book 718ce69fb7 Backed out changeset c8e5a0703821 (bug 1283395) for bustage on a CLOSED TREE 2016-07-21 08:13:06 +02:00
Andi-Bogdan Postelnicu d2d46ad585 Bug 1283395 - add markup functions for static analysis builds. r=froydnj
MozReview-Commit-ID: 1F5GGpQtq4x
2016-07-20 15:45:34 +03:00
Jeff Walden e20f0f4551 Bug 1282795 - Silence warnings when MOZ_ALWAYS_{TRUE,FALSE} are passed expressions with embedded side effects, that would ordinarily trigger side effects but don't inside certain unevaluated contexts within MOZ_ASSERT, which then triggers compiler warnings with new-enough clang. You are not expected to understand this. r=froydnj
--HG--
extra : rebase_source : ffe6d35af74c50b04dbddc9cc3965292875c64a0
2016-06-28 17:12:14 +01:00
Nicholas Nethercote 2511b2c327 Bug 1267550 (part 2) - Rename MOZ_WARN_UNUSED_RESULT as MOZ_MUST_USE. r=froydnj.
It's an annotation that is used a lot, and should be used even more, so a
shorter name is better.

MozReview-Commit-ID: 1VS4Dney4WX

--HG--
extra : rebase_source : b26919c1b0fcb32e5339adeef5be5becae6032cf
2016-04-27 14:16:50 +10:00
Eric Rahm c47a83ce36 Bug 1251769 - Remove remaining references to MOZILLA_XPCOMRT_API from mfbt. r=froydnj 2016-02-27 11:12:07 -08:00
Chris Peterson 3171200ff5 Bug 1235277 - Define MOZ_FALLTHROUGH_ASSERT to workaround -Wunreachable-code warnings about MOZ_FALLTHROUGH in debug builds. r=botond 2015-12-27 13:27:17 -07:00
Bill McCloskey 47b5adaa34 Bug 1221368 - Change MakeTuple to decay the types of its arguments (r=froydnj) 2015-11-09 10:21:11 -08:00
Michael Layzell a764ebee57 Bug 1211979 - Annotate crashes triggered by MOZ_RELEASE_ASSERT, r=froydnj 2015-10-08 17:50:58 -04:00
Michael Layzell e4681ea6a5 Bug 1183355 - Annotate crash reports triggered by MOZ_CRASH in release builds, r=froydnj 2015-10-08 10:01:08 -04:00
Michael Layzell 66779b6bb0 Backout "Bug 1183355 - Annotate crash reports triggered by MOZ_CRASH in release builds, r=froydnj" for OOM concerns
This reverts commit 5ca16aeadfea27afc9939e39d8a6f0a39802c066.
2015-09-24 17:58:34 -04:00
Michael Layzell 3103a27863 Bug 1183355 - Annotate crash reports triggered by MOZ_CRASH in release builds, r=froydnj 2015-09-24 17:12:44 -04:00
Andrew McCreight 5446225d17 Bug 1201271 - Warn about unused results for more methods of nsTArray. r=froydnj
This leaves alone the AppendElement methods.
2015-09-15 15:30:44 -07:00
Randall Barker c236b48231 Bug 1093934 - Create a XPCOM library that can be used to support standalone WebRTC. r=nfroyd
--HG--
extra : rebase_source : 93f11457b16b344e148a6fcb924b286ef8a48051
2015-04-03 15:52:00 +02:00
Wes Kocher e226c762ee Backed out changeset 0f5799df920b (bug 1093934) for various test failures CLOSED TREE
--HG--
extra : amend_source : 047ed43008cea68775c544cdf0df2819cfb24589
2015-04-02 13:42:34 -07:00
Randall Barker 683155c363 Bug 1093934 - Create a XPCOM library that can be used to support standalone WebRTC r=froydnj 2015-04-02 12:12:37 -07:00
Andrew McCreight 2b846790d1 Back out Bug 1127201 (part 1) for various problems. 2015-02-06 15:05:08 -08:00
Nicholas Nethercote 5def42d488 Bug 1127201 (part 1) - Let MOZ_ASSERT take a string variable as the second arg. r=Waldo.
ASSERT_UNLESS_FUZZING() (which is defined multiple times!) caused problems due
when __VA_ARGS__ was empty which is most of the time. So I just disallowed the
optional string, which was only used in a small fraction of the occurrences.

I don't particularly like this patch. I'm not convinced its any better than
just removing the nsPrintfCString()s like I did earlier, but I've done it to at
least show what's involved.

--HG--
extra : rebase_source : 10b5bcf8509eaf2fca300b0b8ab1fa130e9f8b8c
2015-02-04 19:42:29 -08:00
Bobby Holley ebc54d52b9 Bug 1129247 - Introduce MOZ_DIAGNOSTIC_ASSERT. r=Waldo 2015-02-04 13:13:58 -08:00
Dan Gohman f233dc0d72 Bug 1125185 - Define MOZ_COLD for marking "cold" functions r=waldo 2015-01-26 17:30:19 -08:00
Jan de Mooij 8fb96ecee4 Bug 1004028 - Enable assertion type validation on MSVC. r=Waldo,terrence 2015-01-24 14:40:27 +01:00
Trevor Saunders 5b86ecf80c bug 1077549 - remove useless gcc version checks r=glandium 2015-01-15 21:30:05 -05:00
Ehsan Akhgari 497a2e8e51 Bug 1120622 - Define MOZ_SUPPORT_ASSERT_CONDITION_TYPE_VALIDATION for all gcc versions now that we don't support 4.4 any more; r=froydnj 2015-01-14 09:00:34 -05:00
Wes Kocher 1228155e06 Backout 73fcb9fa303d 2015-01-12 14:46:01 -08:00
Ehsan Akhgari e35cd65485 Bug 1120622 - Define MOZ_SUPPORT_ASSERT_CONDITION_TYPE_VALIDATION for all gcc versions now that we don't support 4.4 any more; r=froydnj 2015-01-12 16:35:09 -05:00
David Major 2c2568cc6c Bug 1119030: Make MOZ_CRASHes unique to prevent compiler folding. r=Waldo
--HG--
extra : rebase_source : f8401e3eee6c62545553452e355c8213480a869d
2015-01-08 19:13:04 +13:00