Index: src/deoptimizer.cc |
diff --git a/src/deoptimizer.cc b/src/deoptimizer.cc |
index e0651c7cc19ce4a6bf8d5de04bfee581c0ebdf18..175ee6e1fbe1b88a8e1c494b6baefba93a2e487e 100644 |
--- a/src/deoptimizer.cc |
+++ b/src/deoptimizer.cc |
@@ -1445,7 +1445,7 @@ DeoptimizedFrameInfo::DeoptimizedFrameInfo( |
SetFunction(output_frame->GetFunction()); |
expression_count_ = output_frame->GetExpressionCount(deoptimizer); |
parameters_count_ = output_frame->ComputeParametersCount(); |
- parameters_ = new Object*[expression_count_]; |
+ parameters_ = new Object*[parameters_count_]; |
for (int i = 0; i < parameters_count_; i++) { |
SetParameter(i, output_frame->GetParameter(deoptimizer, i)); |
} |
@@ -1457,7 +1457,8 @@ DeoptimizedFrameInfo::DeoptimizedFrameInfo( |
DeoptimizedFrameInfo::~DeoptimizedFrameInfo() { |
- delete expression_stack_; |
+ delete[] expression_stack_; |
+ delete[] parameters_; |
} |
void DeoptimizedFrameInfo::Iterate(ObjectVisitor* v) { |