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

Unified Diff: src/objects-inl.h

Issue 426633002: Encapsulate type in the PropertyHandlerCompiler (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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
« src/objects.cc ('K') | « src/objects.cc ('k') | src/stub-cache.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-inl.h
diff --git a/src/objects-inl.h b/src/objects-inl.h
index 22bdfa381e93bbd0150ff72a1a5fb83b6545dbb8..e14c1af6db83bbb880df0768ed2c5fe726cf0a23 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -6771,9 +6771,10 @@ void AccessorInfo::set_property_attributes(PropertyAttributes attributes) {
bool AccessorInfo::IsCompatibleReceiver(Object* receiver) {
- Object* function_template = expected_receiver_type();
- if (!function_template->IsFunctionTemplateInfo()) return true;
- return FunctionTemplateInfo::cast(function_template)->IsTemplateFor(receiver);
+ if (!HasExpectedReceiverType()) return true;
+ if (!receiver->IsJSObject()) return false;
+ return FunctionTemplateInfo::cast(expected_receiver_type())
+ ->IsTemplateFor(JSObject::cast(receiver)->map());
}
« src/objects.cc ('K') | « src/objects.cc ('k') | src/stub-cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698