Index: src/ic/ic.cc |
diff --git a/src/ic/ic.cc b/src/ic/ic.cc |
index 620f5724d22faf2a0f81546bce9f825c1b00ebff..93f33cf663f0b7ecee75a53f816f056dd307e987 100644 |
--- a/src/ic/ic.cc |
+++ b/src/ic/ic.cc |
@@ -1690,8 +1690,7 @@ Handle<Code> StoreIC::CompileHandler(LookupIterator* lookup, |
break; |
} |
NamedStoreHandlerCompiler compiler(isolate(), receiver_map(), holder); |
- return compiler.CompileStoreCallback(receiver, lookup->name(), |
- lookup->GetAccessorIndex()); |
+ return compiler.CompileStoreCallback(receiver, lookup->name(), info); |
} else if (accessors->IsAccessorPair()) { |
Handle<Object> setter(Handle<AccessorPair>::cast(accessors)->setter(), |
isolate()); |
@@ -2763,14 +2762,16 @@ RUNTIME_FUNCTION(ToBooleanIC_Miss) { |
RUNTIME_FUNCTION(StoreCallbackProperty) { |
Handle<JSObject> receiver = args.at<JSObject>(0); |
Handle<JSObject> holder = args.at<JSObject>(1); |
- Handle<Smi> accessor_index = args.at<Smi>(2); |
+ Handle<HeapObject> callback_or_cell = args.at<HeapObject>(2); |
Handle<Name> name = args.at<Name>(3); |
Handle<Object> value = args.at<Object>(4); |
HandleScope scope(isolate); |
- Handle<ExecutableAccessorInfo> callback(ExecutableAccessorInfo::cast( |
- holder->map()->instance_descriptors()->GetCallbacksObject( |
- accessor_index->value()))); |
+ Handle<ExecutableAccessorInfo> callback( |
+ callback_or_cell->IsWeakCell() |
+ ? ExecutableAccessorInfo::cast( |
+ WeakCell::cast(*callback_or_cell)->value()) |
+ : ExecutableAccessorInfo::cast(*callback_or_cell)); |
DCHECK(callback->IsCompatibleReceiver(*receiver)); |