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

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

Issue 1230793002: [es6] silence access-check failure for well-known symbol properties (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: change test slightly Created 5 years, 5 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
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 1139 matching lines...) Expand 10 before | Expand all | Expand 10 after
1150 return ToObject( 1150 return ToObject(
1151 isolate, object, handle(isolate->context()->native_context(), isolate)); 1151 isolate, object, handle(isolate->context()->native_context(), isolate));
1152 } 1152 }
1153 1153
1154 1154
1155 bool Object::HasSpecificClassOf(String* name) { 1155 bool Object::HasSpecificClassOf(String* name) {
1156 return this->IsJSObject() && (JSObject::cast(this)->class_name() == name); 1156 return this->IsJSObject() && (JSObject::cast(this)->class_name() == name);
1157 } 1157 }
1158 1158
1159 1159
1160 MaybeHandle<Object> Object::GetProperty(LookupIterator* it,
1161 LanguageMode language_mode) {
1162 bool failedAccessCheck = false;
1163 MaybeHandle<Object> result =
1164 GetPropertyInternal(it, &failedAccessCheck, language_mode);
1165 if (failedAccessCheck) return JSObject::GetPropertyWithFailedAccessCheck(it);
1166 return result;
1167 }
1168
1169
1160 MaybeHandle<Object> Object::GetProperty(Handle<Object> object, 1170 MaybeHandle<Object> Object::GetProperty(Handle<Object> object,
1161 Handle<Name> name, 1171 Handle<Name> name,
1162 LanguageMode language_mode) { 1172 LanguageMode language_mode) {
1163 LookupIterator it(object, name); 1173 LookupIterator it(object, name);
1164 return GetProperty(&it, language_mode); 1174 return GetProperty(&it, language_mode);
1165 } 1175 }
1166 1176
1167 1177
1178 MaybeHandle<Object> Object::GetPropertyOrFallbackValue(
1179 Handle<Object> object, Handle<Name> name, Handle<Object> fallbackValue,
1180 LanguageMode language_mode) {
1181 LookupIterator it(object, name);
1182 bool failedAccessCheck = false;
1183 MaybeHandle<Object> result =
1184 GetPropertyInternal(&it, &failedAccessCheck, language_mode);
1185 if (V8_UNLIKELY(failedAccessCheck)) {
1186 result = fallbackValue;
1187 }
1188 return result;
1189 }
1190
1191
1168 MaybeHandle<Object> Object::GetElement(Isolate* isolate, Handle<Object> object, 1192 MaybeHandle<Object> Object::GetElement(Isolate* isolate, Handle<Object> object,
1169 uint32_t index, 1193 uint32_t index,
1170 LanguageMode language_mode) { 1194 LanguageMode language_mode) {
1171 LookupIterator it(isolate, object, index); 1195 LookupIterator it(isolate, object, index);
1172 return GetProperty(&it, language_mode); 1196 return GetProperty(&it, language_mode);
1173 } 1197 }
1174 1198
1175 1199
1176 Handle<Object> Object::GetPrototypeSkipHiddenPrototypes( 1200 Handle<Object> Object::GetPrototypeSkipHiddenPrototypes(
1177 Isolate* isolate, Handle<Object> receiver) { 1201 Isolate* isolate, Handle<Object> receiver) {
(...skipping 6137 matching lines...) Expand 10 before | Expand all | Expand 10 after
7315 #undef READ_SHORT_FIELD 7339 #undef READ_SHORT_FIELD
7316 #undef WRITE_SHORT_FIELD 7340 #undef WRITE_SHORT_FIELD
7317 #undef READ_BYTE_FIELD 7341 #undef READ_BYTE_FIELD
7318 #undef WRITE_BYTE_FIELD 7342 #undef WRITE_BYTE_FIELD
7319 #undef NOBARRIER_READ_BYTE_FIELD 7343 #undef NOBARRIER_READ_BYTE_FIELD
7320 #undef NOBARRIER_WRITE_BYTE_FIELD 7344 #undef NOBARRIER_WRITE_BYTE_FIELD
7321 7345
7322 } } // namespace v8::internal 7346 } } // namespace v8::internal
7323 7347
7324 #endif // V8_OBJECTS_INL_H_ 7348 #endif // V8_OBJECTS_INL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698