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

Unified Diff: src/objects.cc

Issue 1398093002: Pass the context from which a given receiver is accessed explicitly (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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/lookup.cc ('k') | src/runtime/runtime-classes.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 8336c12909fd9d10993e47b219c3d0a55d242b65..80782d8732bbf1f5ed6bf0fe1f56e7170ea41e63 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -6001,7 +6001,8 @@ Maybe<bool> JSObject::PreventExtensionsInternal(Handle<JSObject> object) {
return PreventExtensionsWithTransition<NONE>(object);
}
- if (object->IsAccessCheckNeeded() && !isolate->MayAccess(object)) {
+ if (object->IsAccessCheckNeeded() &&
+ !isolate->MayAccess(handle(isolate->context()), object)) {
isolate->ReportFailedAccessCheck(object);
RETURN_VALUE_IF_SCHEDULED_EXCEPTION(isolate, Nothing<bool>());
UNREACHABLE();
@@ -6067,7 +6068,8 @@ MaybeHandle<Object> JSObject::PreventExtensions(Handle<JSObject> object) {
bool JSObject::IsExtensible(Handle<JSObject> object) {
Isolate* isolate = object->GetIsolate();
- if (object->IsAccessCheckNeeded() && !isolate->MayAccess(object)) {
+ if (object->IsAccessCheckNeeded() &&
+ !isolate->MayAccess(handle(isolate->context()), object)) {
return true;
}
if (object->IsJSGlobalProxy()) {
@@ -6113,7 +6115,8 @@ Maybe<bool> JSObject::PreventExtensionsWithTransition(Handle<JSObject> object) {
DCHECK(!object->map()->is_observed());
Isolate* isolate = object->GetIsolate();
- if (object->IsAccessCheckNeeded() && !isolate->MayAccess(object)) {
+ if (object->IsAccessCheckNeeded() &&
+ !isolate->MayAccess(handle(isolate->context()), object)) {
isolate->ReportFailedAccessCheck(object);
RETURN_VALUE_IF_SCHEDULED_EXCEPTION(isolate, Nothing<bool>());
UNREACHABLE();
@@ -6921,7 +6924,8 @@ MaybeHandle<FixedArray> JSReceiver::GetKeys(Handle<JSReceiver> object,
Handle<JSObject> current = PrototypeIterator::GetCurrent<JSObject>(iter);
// Check access rights if required.
- if (current->IsAccessCheckNeeded() && !isolate->MayAccess(current)) {
+ if (current->IsAccessCheckNeeded() &&
+ !isolate->MayAccess(handle(isolate->context()), current)) {
if (iter.IsAtEnd(PrototypeIterator::END_AT_NON_HIDDEN)) {
isolate->ReportFailedAccessCheck(current);
RETURN_EXCEPTION_IF_SCHEDULED_EXCEPTION(isolate, FixedArray);
« no previous file with comments | « src/lookup.cc ('k') | src/runtime/runtime-classes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698