| Index: src/ic/arm/handler-compiler-arm.cc
|
| diff --git a/src/ic/arm/handler-compiler-arm.cc b/src/ic/arm/handler-compiler-arm.cc
|
| index d0db7904c858270797ea88716c9f373e40c43755..778b59e23ef191cc430bf29c3a5161d289869510 100644
|
| --- a/src/ic/arm/handler-compiler-arm.cc
|
| +++ b/src/ic/arm/handler-compiler-arm.cc
|
| @@ -569,12 +569,16 @@ void NamedLoadHandlerCompiler::GenerateLoadCallback(
|
| DCHECK(!scratch3().is(reg));
|
| DCHECK(!scratch4().is(reg));
|
| __ push(receiver());
|
| - if (heap()->InNewSpace(callback->data())) {
|
| - __ Move(scratch3(), callback);
|
| - __ ldr(scratch3(),
|
| - FieldMemOperand(scratch3(), ExecutableAccessorInfo::kDataOffset));
|
| + // Push data from ExecutableAccessorInfo.
|
| + Handle<Object> data(callback->data(), isolate());
|
| + if (data->IsUndefined() || data->IsSmi()) {
|
| + __ Move(scratch3(), data);
|
| } else {
|
| - __ Move(scratch3(), Handle<Object>(callback->data(), isolate()));
|
| + Handle<WeakCell> cell =
|
| + isolate()->factory()->NewWeakCell(Handle<HeapObject>::cast(data));
|
| + // The callback is alive if this instruction is executed,
|
| + // so the weak cell is not cleared and points to data.
|
| + __ GetWeakValue(scratch3(), cell);
|
| }
|
| __ push(scratch3());
|
| __ LoadRoot(scratch3(), Heap::kUndefinedValueRootIndex);
|
|
|