Chromium Code Reviews| Index: runtime/vm/become.cc |
| diff --git a/runtime/vm/become.cc b/runtime/vm/become.cc |
| index 0850584e86ce0431ef41917da73ad5bf34bf9d45..5424805bb65ec83d4f20d46eff2529edfe15127d 100644 |
| --- a/runtime/vm/become.cc |
| +++ b/runtime/vm/become.cc |
| @@ -261,6 +261,13 @@ void Become::ElementsForwardIdentity(const Array& before, const Array& after) { |
| } |
| ForwardObjectTo(before_obj, after_obj); |
| + |
| + // Forward the identity hash too if it has one. |
| + intptr_t hash = heap->GetHash(before_obj); |
| + if (hash != 0) { |
| + ASSERT(heap->GetHash(after_obj) == 0); |
| + heap->SetHash(after_obj, hash); |
| + } |
|
siva
2016/08/19 00:08:15
How does this work for internal VM objects, for ex
rmacnak
2016/08/19 00:16:54
A String's usual hash is the one inline in the obj
|
| } |
| { |