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

Unified Diff: src/objects.cc

Issue 1173283004: Restore ExecutableAccessorInfoHandling for now (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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
« src/api.cc ('K') | « src/objects.h ('k') | src/runtime/runtime.h » ('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 86f0900728b6ef90365183b9f1b5dfc6f875599b..58d3fd95c8718dde0817189a0ce73201fc819913 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -4133,7 +4133,8 @@ void ExecutableAccessorInfo::ClearSetter(Handle<ExecutableAccessorInfo> info) {
MaybeHandle<Object> JSObject::ReconfigureAsDataProperty(
- LookupIterator* it, Handle<Object> value, PropertyAttributes attributes) {
+ LookupIterator* it, Handle<Object> value, PropertyAttributes attributes,
+ ExecutableAccessorInfoHandling handling) {
Handle<JSObject> object = Handle<JSObject>::cast(it->GetReceiver());
bool is_observed = object->map()->is_observed() &&
(it->IsElement() ||
@@ -4159,7 +4160,8 @@ MaybeHandle<Object> JSObject::ReconfigureAsDataProperty(
// Special handling for ExecutableAccessorInfo, which behaves like a
// data property.
- if (accessors->IsExecutableAccessorInfo()) {
+ if (accessors->IsExecutableAccessorInfo() &&
+ handling == DONT_FORCE_FIELD) {
Handle<Object> result;
ASSIGN_RETURN_ON_EXCEPTION(
it->isolate(), result,
@@ -4252,7 +4254,7 @@ MaybeHandle<Object> JSObject::ReconfigureAsDataProperty(
// reconfigurable.
MaybeHandle<Object> JSObject::SetOwnPropertyIgnoreAttributes(
Handle<JSObject> object, Handle<Name> name, Handle<Object> value,
- PropertyAttributes attributes) {
+ PropertyAttributes attributes, ExecutableAccessorInfoHandling handling) {
DCHECK(!value->IsTheHole());
LookupIterator it(object, name, LookupIterator::OWN_SKIP_INTERCEPTOR);
if (it.state() == LookupIterator::ACCESS_CHECK) {
@@ -4263,7 +4265,7 @@ MaybeHandle<Object> JSObject::SetOwnPropertyIgnoreAttributes(
}
if (it.IsFound()) {
- return ReconfigureAsDataProperty(&it, value, attributes);
+ return ReconfigureAsDataProperty(&it, value, attributes, handling);
}
return AddDataProperty(&it, value, attributes, STRICT,
@@ -4273,7 +4275,7 @@ MaybeHandle<Object> JSObject::SetOwnPropertyIgnoreAttributes(
MaybeHandle<Object> JSObject::SetOwnElementIgnoreAttributes(
Handle<JSObject> object, uint32_t index, Handle<Object> value,
- PropertyAttributes attributes) {
+ PropertyAttributes attributes, ExecutableAccessorInfoHandling handling) {
DCHECK(!object->HasExternalArrayElements());
Isolate* isolate = object->GetIsolate();
LookupIterator it(isolate, object, index,
@@ -4286,7 +4288,7 @@ MaybeHandle<Object> JSObject::SetOwnElementIgnoreAttributes(
}
if (it.IsFound()) {
- return ReconfigureAsDataProperty(&it, value, attributes);
+ return ReconfigureAsDataProperty(&it, value, attributes, handling);
}
return AddDataProperty(&it, value, attributes, STRICT,
« src/api.cc ('K') | « src/objects.h ('k') | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698