| Index: src/ic/handler-compiler.cc
|
| diff --git a/src/ic/handler-compiler.cc b/src/ic/handler-compiler.cc
|
| index 15dc941503e8309798b78ea47f2ba01ec2fa8465..8752c6cfced1097a05a976fb521f6ce49037baa9 100644
|
| --- a/src/ic/handler-compiler.cc
|
| +++ b/src/ic/handler-compiler.cc
|
| @@ -311,7 +311,25 @@ Handle<Code> NamedLoadHandlerCompiler::CompileLoadInterceptor(
|
|
|
| Label miss;
|
| InterceptorVectorSlotPush(receiver());
|
| + auto holder_orig = holder();
|
| + // Temporarily swap holder to check entire chain. What could go wrong?
|
| + if (holder()->GetNamedInterceptor()->non_masking()) {
|
| + DCHECK(!inline_followup);
|
| + JSObject* last = *holder();
|
| + PrototypeIterator iter(isolate(), last);
|
| + while (!iter.IsAtEnd()) {
|
| + last = JSObject::cast(iter.GetCurrent());
|
| + iter.Advance();
|
| + }
|
| + auto last_handle = handle(last);
|
| + set_holder(last_handle);
|
| + }
|
| Register reg = FrontendHeader(receiver(), it->name(), &miss);
|
| + // Now do the check again, getting the holder into the right register...
|
| + if (holder_orig->GetNamedInterceptor()->non_masking()) {
|
| + set_holder(holder_orig);
|
| + reg = FrontendHeader(receiver(), it->name(), &miss);
|
| + }
|
| FrontendFooter(it->name(), &miss);
|
| InterceptorVectorSlotPop(reg);
|
|
|
| @@ -320,6 +338,7 @@ Handle<Code> NamedLoadHandlerCompiler::CompileLoadInterceptor(
|
| // prototypes and ultimate answer.
|
| GenerateLoadInterceptorWithFollowup(it, reg);
|
| } else {
|
| + // TODO(dcarney): add a function for calling nonmasking interceptors.
|
| GenerateLoadInterceptor(reg);
|
| }
|
| return GetCode(kind(), Code::FAST, it->name());
|
|
|