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

Unified Diff: src/runtime/runtime-classes.cc

Issue 942963004: Remove internal use of v8::AccessType, always pass v8::ACCESS_HAS instead. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove the distinction between named/indexed access checks, always pass "undefined" as "name" Created 5 years, 10 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/objects.cc ('k') | src/runtime/runtime-object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-classes.cc
diff --git a/src/runtime/runtime-classes.cc b/src/runtime/runtime-classes.cc
index ac02ce1b1cd07ee26f8b168ae4adfce6ca822410..fc2f4a0ece516cae71428e3d350b0fe5511dcc24 100644
--- a/src/runtime/runtime-classes.cc
+++ b/src/runtime/runtime-classes.cc
@@ -223,9 +223,8 @@ RUNTIME_FUNCTION(Runtime_ClassGetSourceCode) {
static Object* LoadFromSuper(Isolate* isolate, Handle<Object> receiver,
Handle<JSObject> home_object, Handle<Name> name) {
- if (home_object->IsAccessCheckNeeded() &&
- !isolate->MayNamedAccess(home_object, name, v8::ACCESS_GET)) {
- isolate->ReportFailedAccessCheck(home_object, v8::ACCESS_GET);
+ if (home_object->IsAccessCheckNeeded() && !isolate->MayAccess(home_object)) {
+ isolate->ReportFailedAccessCheck(home_object);
RETURN_FAILURE_IF_SCHEDULED_EXCEPTION(isolate);
}
@@ -243,9 +242,8 @@ static Object* LoadFromSuper(Isolate* isolate, Handle<Object> receiver,
static Object* LoadElementFromSuper(Isolate* isolate, Handle<Object> receiver,
Handle<JSObject> home_object,
uint32_t index) {
- if (home_object->IsAccessCheckNeeded() &&
- !isolate->MayIndexedAccess(home_object, index, v8::ACCESS_GET)) {
- isolate->ReportFailedAccessCheck(home_object, v8::ACCESS_GET);
+ if (home_object->IsAccessCheckNeeded() && !isolate->MayAccess(home_object)) {
+ isolate->ReportFailedAccessCheck(home_object);
RETURN_FAILURE_IF_SCHEDULED_EXCEPTION(isolate);
}
@@ -297,9 +295,8 @@ RUNTIME_FUNCTION(Runtime_LoadKeyedFromSuper) {
static Object* StoreToSuper(Isolate* isolate, Handle<JSObject> home_object,
Handle<Object> receiver, Handle<Name> name,
Handle<Object> value, LanguageMode language_mode) {
- if (home_object->IsAccessCheckNeeded() &&
- !isolate->MayNamedAccess(home_object, name, v8::ACCESS_SET)) {
- isolate->ReportFailedAccessCheck(home_object, v8::ACCESS_SET);
+ if (home_object->IsAccessCheckNeeded() && !isolate->MayAccess(home_object)) {
+ isolate->ReportFailedAccessCheck(home_object);
RETURN_FAILURE_IF_SCHEDULED_EXCEPTION(isolate);
}
@@ -322,9 +319,8 @@ static Object* StoreElementToSuper(Isolate* isolate,
Handle<Object> receiver, uint32_t index,
Handle<Object> value,
LanguageMode language_mode) {
- if (home_object->IsAccessCheckNeeded() &&
- !isolate->MayIndexedAccess(home_object, index, v8::ACCESS_SET)) {
- isolate->ReportFailedAccessCheck(home_object, v8::ACCESS_SET);
+ if (home_object->IsAccessCheckNeeded() && !isolate->MayAccess(home_object)) {
+ isolate->ReportFailedAccessCheck(home_object);
RETURN_FAILURE_IF_SCHEDULED_EXCEPTION(isolate);
}
« no previous file with comments | « src/objects.cc ('k') | src/runtime/runtime-object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698