From e0cb8d320b9f618f6182de230ed17a6277dd1b74 Mon Sep 17 00:00:00 2001 From: Andi-Bogdan Postelnicu Date: Tue, 12 Sep 2017 10:30:17 +0300 Subject: [PATCH] Bug 1398785 - Kill structurally dead code in NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_THIS_BEGIN generated by Coverity. r=sylvestre MozReview-Commit-ID: AB3DLFft5aw --HG-- extra : rebase_source : 6d51c98df43e750d8b21aa8d5de62ab1632afaba --- tools/coverity/model.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/coverity/model.cpp b/tools/coverity/model.cpp index fce193761e85..a150df90125b 100644 --- a/tools/coverity/model.cpp +++ b/tools/coverity/model.cpp @@ -54,6 +54,14 @@ MOZ_ReportCrash(const char* aStr, const char* aFilename, int aLine) #define NS_RUNTIMEABORT(msg) __coverity_panic__() +// Kills Structurally dead code (UNREACHABLE) +#define NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_THIS_BEGIN(_class) \ + NS_IMETHODIMP_(bool) \ + NS_CYCLE_COLLECTION_CLASSNAME(_class)::CanSkipThisReal(void* p) \ + { \ + __coverity_panic__(); \ + _class* tmp = DowncastCCParticipant<_class>(p); + int GET_JUMP_OFFSET(jsbytecode* pc) {