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

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: adding error handling 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') | no next file with comments »
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..c1f67ba5242667e678bad954a9ce017fb5ce92b4 100644
--- a/src/accessors.cc
+++ b/src/accessors.cc
@@ -146,14 +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);
-
- LookupIterator it(object, Utils::OpenHandle(*name));
- CHECK_EQ(LookupIterator::ACCESSOR, it.state());
- DCHECK(it.HolderIsReceiverOrHiddenPrototype());
+ Handle<JSObject> object_handle = Utils::OpenHandle(*info.This());
+ Handle<Object> value_handle = Utils::OpenHandle(*val);
+ Handle<Name> name_handle = Utils::OpenHandle(*name);
- if (Object::SetDataProperty(&it, value).is_null()) {
+ if (JSObject::DefinePropertyOrElementIgnoreAttributes(
+ object_handle, name_handle, value_handle, NONE)
+ .is_null()) {
isolate->OptionalRescheduleException(false);
}
}
« no previous file with comments | « no previous file | test/mjsunit/es6/arguments-iterator.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698