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

Side by Side Diff: src/isolate.cc

Issue 12822002: remove maynamedaccess checks (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/objects.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 926 matching lines...) Expand 10 before | Expand all | Expand 10 after
937 if (key == heap_.hidden_string()) return true; 937 if (key == heap_.hidden_string()) return true;
938 938
939 // Check for compatibility between the security tokens in the 939 // Check for compatibility between the security tokens in the
940 // current lexical context and the accessed object. 940 // current lexical context and the accessed object.
941 ASSERT(context()); 941 ASSERT(context());
942 942
943 MayAccessDecision decision = MayAccessPreCheck(this, receiver, type); 943 MayAccessDecision decision = MayAccessPreCheck(this, receiver, type);
944 if (decision != UNKNOWN) return decision == YES; 944 if (decision != UNKNOWN) return decision == YES;
945 945
946 // Get named access check callback 946 // Get named access check callback
947 // TODO(dcarney): revert 947 JSFunction* constructor = JSFunction::cast(receiver->map()->constructor());
948 Map* map = receiver->map();
949 CHECK(map->IsMap());
950 CHECK(map->constructor()->IsJSFunction());
951 JSFunction* constructor = JSFunction::cast(map->constructor());
952 if (!constructor->shared()->IsApiFunction()) return false; 948 if (!constructor->shared()->IsApiFunction()) return false;
953 949
954 Object* data_obj = 950 Object* data_obj =
955 constructor->shared()->get_api_func_data()->access_check_info(); 951 constructor->shared()->get_api_func_data()->access_check_info();
956 if (data_obj == heap_.undefined_value()) return false; 952 if (data_obj == heap_.undefined_value()) return false;
957 953
958 Object* fun_obj = AccessCheckInfo::cast(data_obj)->named_callback(); 954 Object* fun_obj = AccessCheckInfo::cast(data_obj)->named_callback();
959 v8::NamedSecurityCallback callback = 955 v8::NamedSecurityCallback callback =
960 v8::ToCData<v8::NamedSecurityCallback>(fun_obj); 956 v8::ToCData<v8::NamedSecurityCallback>(fun_obj);
961 957
(...skipping 1379 matching lines...) Expand 10 before | Expand all | Expand 10 after
2341 2337
2342 #ifdef DEBUG 2338 #ifdef DEBUG
2343 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ 2339 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \
2344 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); 2340 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_);
2345 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) 2341 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET)
2346 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) 2342 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET)
2347 #undef ISOLATE_FIELD_OFFSET 2343 #undef ISOLATE_FIELD_OFFSET
2348 #endif 2344 #endif
2349 2345
2350 } } // namespace v8::internal 2346 } } // namespace v8::internal
OLDNEW
« 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