Index: runtime/vm/deopt_instructions.h |
diff --git a/runtime/vm/deopt_instructions.h b/runtime/vm/deopt_instructions.h |
index 3dd538f311a81b94a137ebdf1f53aabc69b4a03a..229a0aaec1c985cd2221ef60bf7a3624408b91f8 100644 |
--- a/runtime/vm/deopt_instructions.h |
+++ b/runtime/vm/deopt_instructions.h |
@@ -485,7 +485,10 @@ class DeoptInfoBuilder : public ValueObject { |
intptr_t CalculateStackIndex(const Location& source_loc) const; |
intptr_t FrameSize() const { |
- return instructions_.length() - frame_start_; |
+ ASSERT(frame_start_ != -1); |
+ const intptr_t frame_size = instructions_.length() - frame_start_; |
+ ASSERT(frame_size >= 0); |
+ return frame_size; |
} |
void AddConstant(const Object& obj, intptr_t dest_index); |