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

Unified Diff: src/accessors.cc

Issue 1332873002: Fixing Sloppy Symbol.iterator setter (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 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 | « no previous file | test/mjsunit/es6/arguments-iterator.js » ('j') | test/mjsunit/es6/arguments-iterator.js » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/accessors.cc
diff --git a/src/accessors.cc b/src/accessors.cc
index 6544e7197c1283f50f9e686643650589f1ff7aab..5f8c48453d8d4cf552df91c8178d3dd7ba05e329 100644
--- a/src/accessors.cc
+++ b/src/accessors.cc
@@ -146,16 +146,13 @@ void Accessors::ArgumentsIteratorSetter(
const v8::PropertyCallbackInfo<void>& info) {
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(info.GetIsolate());
HandleScope scope(isolate);
- Handle<JSObject> object = Utils::OpenHandle(*info.This());
- Handle<Object> value = Utils::OpenHandle(*val);
+ Handle<JSObject> object_handle = Utils::OpenHandle(*info.This());
+ Handle<Object> value_handle = Utils::OpenHandle(*val);
+ Handle<Name> name_handle = Utils::OpenHandle(*name);
- LookupIterator it(object, Utils::OpenHandle(*name));
- CHECK_EQ(LookupIterator::ACCESSOR, it.state());
- DCHECK(it.HolderIsReceiverOrHiddenPrototype());
-
- if (Object::SetDataProperty(&it, value).is_null()) {
- isolate->OptionalRescheduleException(false);
- }
+ JSObject::DefinePropertyOrElementIgnoreAttributes(object_handle, name_handle,
+ value_handle, NONE)
+ .Check();
Camillo Bruni 2015/09/10 13:59:48 I am not fully sure if and how I should check for
Jakob Kummerow 2015/09/10 14:29:20 if: yes, I think you should. (Rule of thumb: if a
}
« no previous file with comments | « no previous file | test/mjsunit/es6/arguments-iterator.js » ('j') | test/mjsunit/es6/arguments-iterator.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698