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

Unified Diff: src/isolate.cc

Issue 11877027: Add some runtime checks to MayNamedAccess (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 | « no previous file | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/isolate.cc
diff --git a/src/isolate.cc b/src/isolate.cc
index 80138c0aab962c8d6569b37ee864cc9732f9849e..5fb90a8acadd62660a5d84834e880d96cc02b05f 100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -924,7 +924,11 @@ bool Isolate::MayNamedAccess(JSObject* receiver, Object* key,
if (decision != UNKNOWN) return decision == YES;
// Get named access check callback
- JSFunction* constructor = JSFunction::cast(receiver->map()->constructor());
+ // TODO(dcarney): revert
+ Map* map = receiver->map();
+ CHECK(map->IsMap());
+ CHECK(map->constructor()->IsJSFunction());
+ JSFunction* constructor = JSFunction::cast(map->constructor());
if (!constructor->shared()->IsApiFunction()) return false;
Object* data_obj =
« no previous file with comments | « no previous file | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698