Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(134)

Unified Diff: src/ic/handler-compiler.cc

Issue 1036843002: fix nonmasking interceptor ic with interceptor on receiver (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/cctest/test-api-interceptors.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | test/cctest/test-api-interceptors.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698