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

Unified Diff: src/runtime/runtime-classes.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-array.cc ('k') | src/runtime/runtime-debug.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-classes.cc
diff --git a/src/runtime/runtime-classes.cc b/src/runtime/runtime-classes.cc
index 51247b728cf60730d3089b4a5bce6472673172ab..3dbcc65eca6af1e5e5e9a0f80009d18dd8a73640 100644
--- a/src/runtime/runtime-classes.cc
+++ b/src/runtime/runtime-classes.cc
@@ -203,8 +203,8 @@ RUNTIME_FUNCTION(Runtime_DefineClassMethod) {
uint32_t index;
if (name->AsArrayIndex(&index)) {
RETURN_FAILURE_ON_EXCEPTION(
- isolate,
- JSObject::SetOwnElement(object, index, function, DONT_ENUM, STRICT));
+ isolate, JSObject::SetOwnElementIgnoreAttributes(object, index,
+ function, DONT_ENUM));
} else {
RETURN_FAILURE_ON_EXCEPTION(
isolate, JSObject::SetOwnPropertyIgnoreAttributes(object, name,
@@ -357,11 +357,12 @@ static Object* StoreElementToSuper(Isolate* isolate,
Handle<Object> proto = PrototypeIterator::GetCurrent(iter);
if (!proto->IsJSReceiver()) return isolate->heap()->undefined_value();
+ LookupIterator it(isolate, receiver, index, Handle<JSReceiver>::cast(proto));
Handle<Object> result;
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
isolate, result,
- Object::SetElementWithReceiver(isolate, proto, receiver, index, value,
- language_mode));
+ Object::SetSuperProperty(&it, value, language_mode,
+ Object::MAY_BE_STORE_FROM_KEYED));
return *result;
}
« no previous file with comments | « src/runtime/runtime-array.cc ('k') | src/runtime/runtime-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698