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 b990a94b934e210e55cc0d9d1333dddcbe3ea5dd..d0db7904c858270797ea88716c9f373e40c43755 100644 |
--- a/src/ic/arm/handler-compiler-arm.cc |
+++ b/src/ic/arm/handler-compiler-arm.cc |
@@ -266,14 +266,20 @@ void PropertyHandlerCompiler::GenerateApiAccessorCall( |
// Put holder in place. |
CallOptimization::HolderLookup holder_lookup; |
- Handle<JSObject> api_holder = |
- optimization.LookupHolderOfExpectedType(receiver_map, &holder_lookup); |
+ int holder_depth = 0; |
+ optimization.LookupHolderOfExpectedType(receiver_map, &holder_lookup, |
+ &holder_depth); |
switch (holder_lookup) { |
case CallOptimization::kHolderIsReceiver: |
__ Move(holder, receiver); |
break; |
case CallOptimization::kHolderFound: |
- __ Move(holder, api_holder); |
+ __ ldr(holder, FieldMemOperand(receiver, HeapObject::kMapOffset)); |
+ __ ldr(holder, FieldMemOperand(holder, Map::kPrototypeOffset)); |
+ for (int i = 1; i < holder_depth; i++) { |
+ __ ldr(holder, FieldMemOperand(holder, HeapObject::kMapOffset)); |
+ __ ldr(holder, FieldMemOperand(holder, Map::kPrototypeOffset)); |
+ } |
break; |
case CallOptimization::kHolderNotFound: |
UNREACHABLE(); |