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

Unified Diff: src/ic/call-optimization.cc

Issue 885763004: follow up named interceptor miss with api callback getter (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 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 | « src/ic/call-optimization.h ('k') | src/ic/handler-compiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic/call-optimization.cc
diff --git a/src/ic/call-optimization.cc b/src/ic/call-optimization.cc
index 5377988d1166fc10ba62f6a8485f809291bf116f..5d7ef7bbebdb283b07ea957dafe52edd1b8457ca 100644
--- a/src/ic/call-optimization.cc
+++ b/src/ic/call-optimization.cc
@@ -49,8 +49,14 @@ Handle<JSObject> CallOptimization::LookupHolderOfExpectedType(
bool CallOptimization::IsCompatibleReceiver(Handle<Object> receiver,
Handle<JSObject> holder) const {
DCHECK(is_simple_api_call());
- if (!receiver->IsJSObject()) return false;
- Handle<Map> map(JSObject::cast(*receiver)->map());
+ if (!receiver->IsHeapObject()) return false;
+ Handle<Map> map(HeapObject::cast(*receiver)->map());
+ return IsCompatibleReceiverType(map, holder);
+}
+
+
+bool CallOptimization::IsCompatibleReceiverType(Handle<Map> map,
+ Handle<JSObject> holder) const {
HolderLookup holder_lookup;
Handle<JSObject> api_holder = LookupHolderOfExpectedType(map, &holder_lookup);
switch (holder_lookup) {
« no previous file with comments | « src/ic/call-optimization.h ('k') | src/ic/handler-compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698