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

Side by Side Diff: src/objects-inl.h

Issue 1521953002: [proxies] fix access issue when having proxies on the prototype-chain of global objects. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: ppc code mess Created 5 years 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // Review notes: 5 // Review notes:
6 // 6 //
7 // - The use of macros in these inline functions may seem superfluous 7 // - The use of macros in these inline functions may seem superfluous
8 // but it is absolutely needed to make sure gcc generates optimal 8 // but it is absolutely needed to make sure gcc generates optimal
9 // code. gcc is not happy when attempting to inline too deep. 9 // code. gcc is not happy when attempting to inline too deep.
10 // 10 //
(...skipping 1169 matching lines...) Expand 10 before | Expand all | Expand 10 after
1180 MAYBE_RETURN_NULL( 1180 MAYBE_RETURN_NULL(
1181 SetProperty(&it, value, language_mode, MAY_BE_STORE_FROM_KEYED)); 1181 SetProperty(&it, value, language_mode, MAY_BE_STORE_FROM_KEYED));
1182 return value; 1182 return value;
1183 } 1183 }
1184 1184
1185 1185
1186 MaybeHandle<Object> Object::GetPrototype(Isolate* isolate, 1186 MaybeHandle<Object> Object::GetPrototype(Isolate* isolate,
1187 Handle<Object> receiver) { 1187 Handle<Object> receiver) {
1188 // We don't expect access checks to be needed on JSProxy objects. 1188 // We don't expect access checks to be needed on JSProxy objects.
1189 DCHECK(!receiver->IsAccessCheckNeeded() || receiver->IsJSObject()); 1189 DCHECK(!receiver->IsAccessCheckNeeded() || receiver->IsJSObject());
1190 Handle<Context> context(isolate->context());
1191 if (receiver->IsAccessCheckNeeded() &&
1192 !isolate->MayAccess(context, Handle<JSObject>::cast(receiver))) {
1193 return isolate->factory()->null_value();
1194 }
1195 PrototypeIterator iter(isolate, receiver, 1190 PrototypeIterator iter(isolate, receiver,
1196 PrototypeIterator::START_AT_RECEIVER); 1191 PrototypeIterator::START_AT_RECEIVER);
1197 do { 1192 do {
1198 if (!iter.AdvanceFollowingProxies()) return MaybeHandle<Object>(); 1193 if (!iter.AdvanceFollowingProxies()) return MaybeHandle<Object>();
1199 } while (!iter.IsAtEnd(PrototypeIterator::END_AT_NON_HIDDEN)); 1194 } while (!iter.IsAtEnd(PrototypeIterator::END_AT_NON_HIDDEN));
1200 return PrototypeIterator::GetCurrent(iter); 1195 return PrototypeIterator::GetCurrent(iter);
1201 } 1196 }
1202 1197
1203 1198
1204 MaybeHandle<Object> Object::GetProperty(Isolate* isolate, Handle<Object> object, 1199 MaybeHandle<Object> Object::GetProperty(Isolate* isolate, Handle<Object> object,
(...skipping 6682 matching lines...) Expand 10 before | Expand all | Expand 10 after
7887 #undef WRITE_INT64_FIELD 7882 #undef WRITE_INT64_FIELD
7888 #undef READ_BYTE_FIELD 7883 #undef READ_BYTE_FIELD
7889 #undef WRITE_BYTE_FIELD 7884 #undef WRITE_BYTE_FIELD
7890 #undef NOBARRIER_READ_BYTE_FIELD 7885 #undef NOBARRIER_READ_BYTE_FIELD
7891 #undef NOBARRIER_WRITE_BYTE_FIELD 7886 #undef NOBARRIER_WRITE_BYTE_FIELD
7892 7887
7893 } // namespace internal 7888 } // namespace internal
7894 } // namespace v8 7889 } // namespace v8
7895 7890
7896 #endif // V8_OBJECTS_INL_H_ 7891 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/mips64/code-stubs-mips64.cc ('k') | src/ppc/code-stubs-ppc.cc » ('j') | src/prototype.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698