Index: src/deoptimizer.cc |
diff --git a/src/deoptimizer.cc b/src/deoptimizer.cc |
index 1b78bae30573e12b385cfbb24720aaef89561faf..1f645e41cc6d7c18063b623178d4fcfc197dcfc8 100644 |
--- a/src/deoptimizer.cc |
+++ b/src/deoptimizer.cc |
@@ -1752,7 +1752,11 @@ Handle<Object> Deoptimizer::MaterializeNextHeapObject() { |
Handle<JSObject> arguments = Handle<JSObject>::cast( |
Accessors::FunctionGetArguments(function)); |
materialized_objects_->Add(arguments); |
- materialization_value_index_ += length; |
+ // To keep consistent object counters, we still materialize the |
+ // nested values (but we throw them away). |
+ for (int i = 0; i < length; ++i) { |
+ MaterializeNextValue(); |
+ } |
} else if (desc.is_arguments()) { |
// Construct an arguments object and copy the parameters to a newly |
// allocated arguments object backing store. |