Bug 1412212. P1 - the DUMP() macro needs no nsPrintfCString. draft
authorJW Wang <jwwang@mozilla.com>
Fri, 27 Oct 2017 14:58:33 +0800
changeset 687377 080020c19ba0386dd9ec66a74af72a195bb8712e
parent 687376 a65982e09035f4aea7b4dcbde25b2a42565d932f
child 687378 71334712e9464a9d5fe0bc880ffa07a304990c06
push id86483
push userjwwang@mozilla.com
push dateFri, 27 Oct 2017 07:41:56 +0000
bugs1412212
milestone58.0a1
Bug 1412212. P1 - the DUMP() macro needs no nsPrintfCString. printf_stderr() already supports string formatting. MozReview-Commit-ID: 6DhkrUtTP9c
dom/media/MediaDecoder.cpp
--- a/dom/media/MediaDecoder.cpp
+++ b/dom/media/MediaDecoder.cpp
@@ -50,18 +50,17 @@ namespace mozilla {
 // avoid redefined macro in unified build
 #undef LOG
 #undef DUMP
 
 LazyLogModule gMediaDecoderLog("MediaDecoder");
 #define LOG(x, ...) \
   MOZ_LOG(gMediaDecoderLog, LogLevel::Debug, ("Decoder=%p " x, this, ##__VA_ARGS__))
 
-#define DUMP(x, ...) \
-  printf_stderr("%s\n", nsPrintfCString("Decoder=%p " x, this, ##__VA_ARGS__).get())
+#define DUMP(x, ...) printf_stderr(x "\n", ##__VA_ARGS__)
 
 #define NS_DispatchToMainThread(...) CompileError_UseAbstractMainThreadInstead
 
 static const char*
 ToPlayStateStr(MediaDecoder::PlayState aState)
 {
   switch (aState) {
     case MediaDecoder::PLAY_STATE_START:    return "START";