Index: src/ic/handler-compiler.cc |
diff --git a/src/ic/handler-compiler.cc b/src/ic/handler-compiler.cc |
index 9c25f0a1564d753bd62a1bb3ecb1d9d31aad591c..f103f8daf1013746e003f0dc92e3d1e0d3d73e92 100644 |
--- a/src/ic/handler-compiler.cc |
+++ b/src/ic/handler-compiler.cc |
@@ -332,9 +332,13 @@ Handle<Code> NamedLoadHandlerCompiler::CompileLoadInterceptor( |
// Reset the holder so further calculations are correct. |
set_holder(holder_orig); |
if (lost_holder_register) { |
- // Reload lost holder register. |
- auto cell = isolate()->factory()->NewWeakCell(holder()); |
- __ LoadWeakValue(reg, cell, &miss); |
+ if (*it->GetReceiver() == *holder()) { |
+ reg = receiver(); |
+ } else { |
+ // Reload lost holder register. |
+ auto cell = isolate()->factory()->NewWeakCell(holder()); |
+ __ LoadWeakValue(reg, cell, &miss); |
+ } |
} |
FrontendFooter(it->name(), &miss); |
InterceptorVectorSlotPop(reg); |