Bug 1341452 - Use MSC's __FUNCSIG__ or gcc/clang's __PRETTY_FUNCTION__ in MediaResult's RESULT_DETAIL - r=jya

Since these are used in diagnostic messages intended for developers, more
detailed information should help with distinguishing some issues. E.g.:
Before: "Init"
After: "virtual RefPtr<MP4Demuxer::InitPromise> mozilla::MP4Demuxer::Init()"

MozReview-Commit-ID: TgNNn66Ilj

--HG--
extra : rebase_source : 572af3a82d046bb790c4b54e13bc45451229c9e0
This commit is contained in:
Gerald Squelart 2017-02-21 14:44:40 +11:00
parent 72ecfb5fd6
commit dbb8cb16a7

View File

@ -59,7 +59,11 @@ private:
nsCString mMessage;
};
#define RESULT_DETAIL(arg, ...) nsPrintfCString("%s: " arg, __func__, ##__VA_ARGS__)
#ifdef _MSC_VER
#define RESULT_DETAIL(arg, ...) nsPrintfCString("%s: " arg, __FUNCSIG__, ##__VA_ARGS__)
#else
#define RESULT_DETAIL(arg, ...) nsPrintfCString("%s: " arg, __PRETTY_FUNCTION__, ##__VA_ARGS__)
#endif
} // namespace mozilla
#endif // MediaResult_h_