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

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

Issue 1975763002: [runtime] Make sure that LookupIterator::OWN always performs a HIDDEN lookup as well. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comment Created 4 years, 7 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/runtime/runtime-debug.cc ('k') | src/runtime/runtime-scopes.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-object.cc
diff --git a/src/runtime/runtime-object.cc b/src/runtime/runtime-object.cc
index c0f124470ecfb9d80332f96a8e5a6607c833d08b..4b4588804f53c35aaa529e4ffe26362ce24bac84 100644
--- a/src/runtime/runtime-object.cc
+++ b/src/runtime/runtime-object.cc
@@ -120,7 +120,7 @@ Maybe<bool> Runtime::DeleteObjectProperty(Isolate* isolate,
LanguageMode language_mode) {
bool success = false;
LookupIterator it = LookupIterator::PropertyOrElement(
- isolate, receiver, key, &success, LookupIterator::HIDDEN);
+ isolate, receiver, key, &success, LookupIterator::OWN);
if (!success) return Nothing<bool>();
return JSReceiver::DeleteProperty(&it, language_mode);
@@ -169,7 +169,7 @@ RUNTIME_FUNCTION(Runtime_ObjectHasOwnProperty) {
}
// Slow case.
- LookupIterator::Configuration c = LookupIterator::HIDDEN;
+ LookupIterator::Configuration c = LookupIterator::OWN;
LookupIterator it = key_is_array_index
? LookupIterator(isolate, js_obj, index, js_obj, c)
: LookupIterator(js_obj, key, js_obj, c);
@@ -300,7 +300,7 @@ RUNTIME_FUNCTION(Runtime_LoadGlobalViaContext) {
Handle<Name> name(scope_info->ContextSlotName(slot), isolate);
Handle<JSGlobalObject> global_object(script_context->global_object(),
isolate);
- LookupIterator it(global_object, name, global_object, LookupIterator::HIDDEN);
+ LookupIterator it(global_object, name, global_object, LookupIterator::OWN);
// Switch to fast mode only if there is a data property and it's not on
// a hidden prototype.
@@ -335,7 +335,7 @@ Object* StoreGlobalViaContext(Isolate* isolate, int slot, Handle<Object> value,
Handle<Name> name(scope_info->ContextSlotName(slot), isolate);
Handle<JSGlobalObject> global_object(script_context->global_object(),
isolate);
- LookupIterator it(global_object, name, global_object, LookupIterator::HIDDEN);
+ LookupIterator it(global_object, name, global_object, LookupIterator::OWN);
// Switch to fast mode only if there is a data property and it's not on
// a hidden prototype.
@@ -1116,7 +1116,7 @@ RUNTIME_FUNCTION(Runtime_CreateDataProperty) {
CONVERT_ARG_HANDLE_CHECKED(Object, value, 2);
bool success;
LookupIterator it = LookupIterator::PropertyOrElement(
- isolate, o, key, &success, LookupIterator::HIDDEN);
+ isolate, o, key, &success, LookupIterator::OWN);
if (!success) return isolate->heap()->exception();
MAYBE_RETURN(
JSReceiver::CreateDataProperty(&it, value, Object::THROW_ON_ERROR),
« no previous file with comments | « src/runtime/runtime-debug.cc ('k') | src/runtime/runtime-scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698