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

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

Issue 1172683003: Use the LookupIterator for SetElement and friends (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 5 years, 6 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-object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-literals.cc
diff --git a/src/runtime/runtime-literals.cc b/src/runtime/runtime-literals.cc
index 522411829abe4fc7a0d556a96360a40ef14d8a13..52c1726dc65ea256c1fafeb5d7eea890cf1f161f 100644
--- a/src/runtime/runtime-literals.cc
+++ b/src/runtime/runtime-literals.cc
@@ -94,8 +94,8 @@ MUST_USE_RESULT static MaybeHandle<Object> CreateObjectLiteralBoilerplate(
if (Handle<String>::cast(key)->AsArrayIndex(&element_index)) {
// Array index as string (uint32).
if (value->IsUninitialized()) value = handle(Smi::FromInt(0), isolate);
- maybe_result =
- JSObject::SetOwnElement(boilerplate, element_index, value, SLOPPY);
+ maybe_result = JSObject::SetOwnElementIgnoreAttributes(
+ boilerplate, element_index, value, NONE);
} else {
Handle<String> name(String::cast(*key));
DCHECK(!name->AsArrayIndex(&element_index));
@@ -105,8 +105,8 @@ MUST_USE_RESULT static MaybeHandle<Object> CreateObjectLiteralBoilerplate(
} else if (key->ToArrayIndex(&element_index)) {
// Array index (uint32).
if (value->IsUninitialized()) value = handle(Smi::FromInt(0), isolate);
- maybe_result =
- JSObject::SetOwnElement(boilerplate, element_index, value, SLOPPY);
+ maybe_result = JSObject::SetOwnElementIgnoreAttributes(
+ boilerplate, element_index, value, NONE);
} else {
// Non-uint32 number.
DCHECK(key->IsNumber());
« no previous file with comments | « src/runtime/runtime-debug.cc ('k') | src/runtime/runtime-object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698