Bug 1131433 - Further fixes to SourceBufferDecoder.cpp a=bustage
authorWes Kocher <wkocher@mozilla.com>
Fri, 27 Feb 2015 15:35:23 -0800
changeset 250125 20ea789e69df
parent 250124 e32cd39a1917
child 250126 021aac3d7804
push id4507
push userkwierso@gmail.com
push date2015-02-27 23:36 +0000
treeherdermozilla-beta@20ea789e69df [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbustage
bugs1131433
milestone37.0
Bug 1131433 - Further fixes to SourceBufferDecoder.cpp a=bustage
dom/media/mediasource/SourceBufferDecoder.cpp
--- a/dom/media/mediasource/SourceBufferDecoder.cpp
+++ b/dom/media/mediasource/SourceBufferDecoder.cpp
@@ -8,17 +8,23 @@
 #include "SourceBufferDecoder.h"
 #include "prlog.h"
 #include "AbstractMediaDecoder.h"
 #include "MediaDecoderReader.h"
 #include "mozilla/dom/TimeRanges.h"
 
 #ifdef PR_LOGGING
 extern PRLogModuleInfo* GetMediaSourceLog();
+/* Polyfill __func__ on MSVC to pass to the log. */
+#ifdef _MSC_VER
+#define __func__ __FUNCTION__
+#endif
 
+#define STRINGIFY(x) #x
+#define TOSTRING(x) STRINGIFY(x)
 #define MSE_DEBUG(arg, ...) PR_LOG(GetMediaSourceLog(), PR_LOG_DEBUG, (TOSTRING(name) "SourceBufferDecoder(%p:%s)::%s: " arg, this, mResource->GetContentType().get(), __func__, ##__VA_ARGS__))
 #else
 #define MSE_DEBUG(...)
 #endif
 
 namespace mozilla {
 
 class ReentrantMonitor;