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

86 Коммитов

Автор SHA1 Сообщение Дата
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
Chris Peterson a9b69a841b Bug 990764 - Remove MOZ_ASSUME_UNREACHABLE and MOZ_NIGHTLY_ASSERT macros. r=Waldo 2014-06-29 19:21:50 -07:00
Jeff Walden 2e6b85e6f1 Bug 1064451 - Convert assertion-expression-type checking code to not perform a function call. r=froydnj
--HG--
extra : rebase_source : d88adf94137dca875444c4aa8c7b3e9ce9c7dedd
2014-09-07 01:04:09 -07:00
Nicholas Nethercote 2a0942be41 Bug 1036789 - Convert the third quarter of MFBT to Gecko style. r=Ms2ger.
--HG--
extra : rebase_source : 668cd394806203ddfa34bd4f226335ff26c846b5
2014-07-10 19:10:17 -07:00
Nicholas Nethercote 9439ff268e Bug 1026319 - Convert the second quarter of MFBT to Gecko style. r=froydnj.
--HG--
extra : rebase_source : 98d2557c7fe4648d79143c654e7e31767fca2e65
2014-06-12 23:34:08 -07:00
Nicholas Nethercote 7e98d1c248 Bug 1014377 - Convert the first quarter of MFBT to Gecko style. r=froydnj.
--HG--
extra : rebase_source : b3b2da775e2c0e8a6ecbed70e7bd0c8f7af67b47
2014-05-29 22:40:33 -07:00
Chris Peterson a611a1764f Bug 990764 - Add MOZ_ASSERT_UNREACHABLE and MOZ_MAKE_COMPILER_ASSUME_IS_UNREACHABLE. r=Waldo 2014-04-05 18:07:09 -07:00
Sylvestre Ledru 6e74be8757 Bug 997145 - Add a attribute in order to silent a Clang static analyzer check r=nfroyd
--HG--
extra : amend_source : 9ef01d8df4e8797981f770621a3885d456db5801
2014-05-06 16:23:08 +02:00
Ehsan Akhgari 88fbe13b7d Bug 1005730 - Print assertion stacks for MOZ_ASSERT and MOZ_CRASH for code that lives inside libxul; r=froydnj
The hyphenation changes are necessary because hnjalloc.h #defines FILE to
a custom data structure, which clashes with using |stderr| in Assertions.h.
2014-05-05 22:02:04 -04:00
Benoit Jacob cf6decae49 Bug 920292 - Check the types of assert conditions - r=froydnj 2014-04-30 22:39:13 -04:00
Birunthan Mohanathas accb4d62ef Bug 989460 - Part 1: Add MacroArgs.h for macros related to implementing variadic macros. r=Waldo
This also converts MOZ_RELEASE_ASSERT and MOZ_BEGIN_NESTED_ENUM_CLASS to use the new helper macros.
2014-04-24 10:48:00 +02:00
Bobby Holley 75c5db5a1c Bug 928636 - Whitespace changes. r=Waldo 2013-11-25 09:37:16 -08:00