Bug 1246925 - log filtering_type and mapping_type only if they are valid pointers. r=ekr
authorBogdan Postelnicu <bogdan.postelnicu@softvision.ro>
Tue, 09 Feb 2016 15:38:00 +0200
changeset 283635 557693d740ec7bb13c1815976e2bd8c8c3aa8964
parent 283634 0a47d0927f3d0159a98d101dc61539796eeff023
child 283636 1e5acf7ffffc538147ec6c56663f6ffce32f2a77
push id29988
push usercbook@mozilla.com
push dateWed, 10 Feb 2016 10:47:59 +0000
treeherdermozilla-central@7042e8a19f94 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersekr
bugs1246925
milestone47.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1246925 - log filtering_type and mapping_type only if they are valid pointers. r=ekr
media/mtransport/nricectx.cpp
--- a/media/mtransport/nricectx.cpp
+++ b/media/mtransport/nricectx.cpp
@@ -537,20 +537,19 @@ RefPtr<NrIceCtx> NrIceCtx::Create(const 
           "media.peerconnection.nat_simulator.filtering_type",
           &filtering_type);
       rv = pref_branch->GetBoolPref(
           "media.peerconnection.nat_simulator.block_udp",
           &block_udp);
     }
   }
 
-  MOZ_MTLOG(ML_DEBUG, "NAT filtering type: " << filtering_type);
-  MOZ_MTLOG(ML_DEBUG, "NAT mapping type: " << mapping_type);
-
   if (mapping_type && filtering_type) {
+    MOZ_MTLOG(ML_DEBUG, "NAT filtering type: " << filtering_type);
+    MOZ_MTLOG(ML_DEBUG, "NAT mapping type: " << mapping_type);
     TestNat* test_nat = new TestNat;
     test_nat->filtering_type_ = TestNat::ToNatBehavior(filtering_type);
     test_nat->mapping_type_ = TestNat::ToNatBehavior(mapping_type);
     test_nat->block_udp_ = block_udp;
     test_nat->enabled_ = true;
     ctx->SetNat(test_nat);
   }