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

Unified Diff: src/objects.cc

Issue 1650033003: Revert of [runtime] further dismantle AccessorInfoHandling, reducing it to the single API usecase. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 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/objects.h ('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/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index f5cc051c095c70000986095d62d875c5c7f34476..3ddbe50f75904e7099ac25752d4c1edec6bec22e 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -5337,29 +5337,32 @@
CERTAINLY_NOT_STORE_FROM_KEYED);
}
+
MaybeHandle<Object> JSObject::SetOwnPropertyIgnoreAttributes(
Handle<JSObject> object, Handle<Name> name, Handle<Object> value,
- PropertyAttributes attributes) {
+ PropertyAttributes attributes, AccessorInfoHandling handling) {
DCHECK(!value->IsTheHole());
LookupIterator it(object, name, LookupIterator::OWN);
- return DefineOwnPropertyIgnoreAttributes(&it, value, attributes);
-}
+ return DefineOwnPropertyIgnoreAttributes(&it, value, attributes, handling);
+}
+
MaybeHandle<Object> JSObject::SetOwnElementIgnoreAttributes(
Handle<JSObject> object, uint32_t index, Handle<Object> value,
- PropertyAttributes attributes) {
+ PropertyAttributes attributes, AccessorInfoHandling handling) {
Isolate* isolate = object->GetIsolate();
LookupIterator it(isolate, object, index, LookupIterator::OWN);
- return DefineOwnPropertyIgnoreAttributes(&it, value, attributes);
-}
+ return DefineOwnPropertyIgnoreAttributes(&it, value, attributes, handling);
+}
+
MaybeHandle<Object> JSObject::DefinePropertyOrElementIgnoreAttributes(
Handle<JSObject> object, Handle<Name> name, Handle<Object> value,
- PropertyAttributes attributes) {
+ PropertyAttributes attributes, AccessorInfoHandling handling) {
Isolate* isolate = object->GetIsolate();
LookupIterator it = LookupIterator::PropertyOrElement(isolate, object, name,
LookupIterator::OWN);
- return DefineOwnPropertyIgnoreAttributes(&it, value, attributes);
+ return DefineOwnPropertyIgnoreAttributes(&it, value, attributes, handling);
}
@@ -6591,8 +6594,8 @@
? desc->value()
: Handle<Object>::cast(isolate->factory()->undefined_value()));
MaybeHandle<Object> result =
- JSObject::DefineOwnPropertyIgnoreAttributes(it, value,
- desc->ToAttributes());
+ JSObject::DefineOwnPropertyIgnoreAttributes(
+ it, value, desc->ToAttributes(), JSObject::DONT_FORCE_FIELD);
if (result.is_null()) return Nothing<bool>();
}
} else {
@@ -6784,8 +6787,8 @@
? current->value()
: Handle<Object>::cast(
isolate->factory()->undefined_value()));
- MaybeHandle<Object> result =
- JSObject::DefineOwnPropertyIgnoreAttributes(it, value, attrs);
+ MaybeHandle<Object> result = JSObject::DefineOwnPropertyIgnoreAttributes(
+ it, value, attrs, JSObject::DONT_FORCE_FIELD);
if (result.is_null()) return Nothing<bool>();
} else {
DCHECK(desc_is_accessor_descriptor ||
@@ -6849,9 +6852,10 @@
return Just(false);
}
- RETURN_ON_EXCEPTION_VALUE(it->isolate(),
- DefineOwnPropertyIgnoreAttributes(it, value, NONE),
- Nothing<bool>());
+ RETURN_ON_EXCEPTION_VALUE(
+ it->isolate(),
+ DefineOwnPropertyIgnoreAttributes(it, value, NONE, DONT_FORCE_FIELD),
+ Nothing<bool>());
return Just(true);
}
« no previous file with comments | « src/objects.h ('k') | src/runtime/runtime-scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698