Bug 1346725 - removed useless null check in DoSampleStackTrace. r?mstange draft
authorAndi-Bogdan Postelnicu <bpostelnicu@mozilla.com>
Mon, 13 Mar 2017 12:50:22 +0200
changeset 497446 dd9e6f23e6cc6ae87d7cd510ad8008bdea0e4838
parent 497206 f9362554866b327700c7f9b18050d7b7eb3d2b23
child 548896 757bd2df3d8624b4378ececf83cf1474fe96592e
push id48909
push userbmo:bpostelnicu@mozilla.com
push dateMon, 13 Mar 2017 10:51:11 +0000
reviewersmstange
bugs1346725
milestone55.0a1
Bug 1346725 - removed useless null check in DoSampleStackTrace. r?mstange MozReview-Commit-ID: 374xPqkTMxJ
tools/profiler/core/platform.cpp
--- a/tools/profiler/core/platform.cpp
+++ b/tools/profiler/core/platform.cpp
@@ -931,17 +931,17 @@ DoNativeBacktrace(PS::LockRef aLock, Pro
 
 static void
 DoSampleStackTrace(PS::LockRef aLock, ProfileBuffer* aBuffer,
                    TickSample* aSample)
 {
   NativeStack nativeStack = { nullptr, nullptr, 0, 0 };
   MergeStacksIntoProfile(aBuffer, aSample, nativeStack);
 
-  if (aSample && gPS->FeatureLeaf(aLock)) {
+  if (gPS->FeatureLeaf(aLock)) {
     aBuffer->addTag(ProfileBufferEntry::NativeLeafAddr((void*)aSample->pc));
   }
 }
 
 // This function is called for each sampling period with the current program
 // counter. It is called within a signal and so must be re-entrant.
 static void
 Tick(PS::LockRef aLock, ProfileBuffer* aBuffer, TickSample* aSample)