Bug Bug 1338517 - fix false positive for static analysis in mergeStacksIntoProfile. r?mstange draft
authorAndi-Bogdan Postelnicu <bpostelnicu@mozilla.com>
Fri, 10 Feb 2017 15:17:00 +0200
changeset 481690 b3d112de35d88693f36a5ced2d6360bfcfb9b768
parent 481595 25a94c1047e793ef096d8556fa3c26dd72bd37d7
child 545289 8f6e27517307a79db8ee23909d8fc61ac2073866
push id44922
push userbmo:bpostelnicu@mozilla.com
push dateFri, 10 Feb 2017 13:17:38 +0000
reviewersmstange
bugs1338517
milestone54.0a1
Bug Bug 1338517 - fix false positive for static analysis in mergeStacksIntoProfile. r?mstange MozReview-Commit-ID: AOYksJVNkwi
tools/profiler/core/Sampler.cpp
--- a/tools/profiler/core/Sampler.cpp
+++ b/tools/profiler/core/Sampler.cpp
@@ -743,17 +743,17 @@ mergeStacksIntoProfile(ThreadInfo& aInfo
   }
   uint32_t jsCount = 0;
   JS::ProfilingFrameIterator::Frame jsFrames[1000];
   // Only walk jit stack if profiling frame iterator is turned on.
   if (pseudoStack->mContext && JS::IsProfilingEnabledForContext(pseudoStack->mContext)) {
     AutoWalkJSStack autoWalkJSStack;
     const uint32_t maxFrames = mozilla::ArrayLength(jsFrames);
 
-    if (aSample && autoWalkJSStack.walkAllowed) {
+    if (autoWalkJSStack.walkAllowed) {
       JS::ProfilingFrameIterator::RegisterState registerState;
       registerState.pc = aSample->pc;
       registerState.sp = aSample->sp;
       registerState.lr = aSample->lr;
 
       JS::ProfilingFrameIterator jsIter(pseudoStack->mContext,
                                         registerState,
                                         startBufferGen);