Index: runtime/vm/profiler.cc |
diff --git a/runtime/vm/profiler.cc b/runtime/vm/profiler.cc |
index 5e66e145fb76d2fc4f2989a4dd386ae4dc2d690f..fdfba514f24d4e10ebbbe4c064d64bde793c953d 100644 |
--- a/runtime/vm/profiler.cc |
+++ b/runtime/vm/profiler.cc |
@@ -1752,7 +1752,8 @@ class ProfilerNativeStackWalker : public ValueObject { |
uword* fp = reinterpret_cast<uword*>(original_fp_); |
uword* previous_fp = fp; |
- if ((original_fp_ - original_sp_) >= kMaxStep) { |
+ uword gap = original_fp_ - original_sp_; |
+ if (gap >= kMaxStep) { |
// Gap between frame pointer and stack pointer is |
// too large. |
return; |
@@ -1778,7 +1779,8 @@ class ProfilerNativeStackWalker : public ValueObject { |
return; |
} |
- if ((fp - previous_fp) >= kMaxStep) { |
+ gap = fp - previous_fp; |
+ if (gap >= kMaxStep) { |
// Frame pointer step is too large. |
return; |
} |