| Index: src/ia32/stub-cache-ia32.cc
|
| diff --git a/src/ia32/stub-cache-ia32.cc b/src/ia32/stub-cache-ia32.cc
|
| index 71740ac5c7ebd1ea50bcaaa73ad7e9222e6d7931..4964c02f6a4f81c60bd9036f71a38adbed957125 100644
|
| --- a/src/ia32/stub-cache-ia32.cc
|
| +++ b/src/ia32/stub-cache-ia32.cc
|
| @@ -782,10 +782,19 @@ void StubCompiler::GenerateStoreField(MacroAssembler* masm,
|
| }
|
|
|
| if (!transition.is_null()) {
|
| - // Update the map of the object; no write barrier updating is
|
| - // needed because the map is never in new space.
|
| - __ mov(FieldOperand(receiver_reg, HeapObject::kMapOffset),
|
| - Immediate(transition));
|
| + // Update the map of the object.
|
| + __ mov(scratch, Immediate(transition));
|
| + __ mov(FieldOperand(receiver_reg, HeapObject::kMapOffset), scratch);
|
| +
|
| + // Update the write barrier for the map field and pass the now unused
|
| + // name_reg as scratch register.
|
| + __ RecordWriteField(receiver_reg,
|
| + HeapObject::kMapOffset,
|
| + scratch,
|
| + name_reg,
|
| + kDontSaveFPRegs,
|
| + OMIT_REMEMBERED_SET,
|
| + OMIT_SMI_CHECK);
|
| }
|
|
|
| // Adjust for the number of properties stored in the object. Even in the
|
|
|