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 c0a808c53367b4969f985e8b16452627ea2ec5b1..bacf44dbe47e00d5c831a7da167ca63baebe8160 100644 |
--- a/src/ic/arm/handler-compiler-arm.cc |
+++ b/src/ic/arm/handler-compiler-arm.cc |
@@ -671,12 +671,21 @@ void NamedLoadHandlerCompiler::GenerateLoadInterceptor(Register holder_reg) { |
Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback( |
- Handle<JSObject> object, Handle<Name> name, int accessor_index) { |
+ Handle<JSObject> object, Handle<Name> name, |
+ Handle<ExecutableAccessorInfo> callback) { |
Register holder_reg = Frontend(name); |
__ push(receiver()); // receiver |
__ push(holder_reg); |
- __ mov(ip, Operand(Smi::FromInt(accessor_index))); |
+ |
+ // If the callback cannot leak, then push the callback directly, |
+ // otherwise wrap it in a weak cell. |
+ if (callback->data()->IsUndefined() || callback->data()->IsSmi()) { |
+ __ mov(ip, Operand(callback)); |
+ } else { |
+ Handle<WeakCell> cell = isolate()->factory()->NewWeakCell(callback); |
+ __ mov(ip, Operand(cell)); |
+ } |
__ push(ip); |
__ mov(ip, Operand(name)); |
__ Push(ip, value()); |