Index: src/ic/handler-compiler.cc |
diff --git a/src/ic/handler-compiler.cc b/src/ic/handler-compiler.cc |
index 077a3a9a6d7e2d0043291a7ee7d890e7d2079263..09ccd37bd9d17d602b373fd56cbacd4047ae1a98 100644 |
--- a/src/ic/handler-compiler.cc |
+++ b/src/ic/handler-compiler.cc |
@@ -330,6 +330,9 @@ Handle<Code> NamedLoadHandlerCompiler::CompileLoadInterceptor( |
PrototypeIterator iter(isolate(), last); |
while (!iter.IsAtEnd()) { |
lost_holder_register = true; |
+ // Casting to JSObject is fine here. The LookupIterator makes sure to |
+ // look behind non-masking interceptors during the original lookup, and |
+ // we wouldn't try to compile a handler if there was a Proxy anywhere. |
last = iter.GetCurrent<JSObject>(); |
iter.Advance(); |
} |