Always assume SetOwnPropertyIgnoreAttributes to be CERTAINLY_NOT_FROM_KEYED
BUG= R=jkummerow@chromium.org Review URL: https://codereview.chromium.org/463963002 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23165 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
e1575f8369
commit
41a970c5e7
@ -3894,7 +3894,6 @@ MaybeHandle<Object> JSObject::SetOwnPropertyIgnoreAttributes(
|
|||||||
Handle<Name> name,
|
Handle<Name> name,
|
||||||
Handle<Object> value,
|
Handle<Object> value,
|
||||||
PropertyAttributes attributes,
|
PropertyAttributes attributes,
|
||||||
StoreFromKeyed store_from_keyed,
|
|
||||||
ExecutableAccessorInfoHandling handling) {
|
ExecutableAccessorInfoHandling handling) {
|
||||||
DCHECK(!value->IsTheHole());
|
DCHECK(!value->IsTheHole());
|
||||||
LookupIterator it(object, name, LookupIterator::CHECK_HIDDEN_ACCESS);
|
LookupIterator it(object, name, LookupIterator::CHECK_HIDDEN_ACCESS);
|
||||||
@ -4012,7 +4011,8 @@ MaybeHandle<Object> JSObject::SetOwnPropertyIgnoreAttributes(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return AddDataProperty(&it, value, attributes, STRICT, store_from_keyed);
|
return AddDataProperty(&it, value, attributes, STRICT,
|
||||||
|
CERTAINLY_NOT_STORE_FROM_KEYED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -2140,7 +2140,6 @@ class JSObject: public JSReceiver {
|
|||||||
Handle<Name> key,
|
Handle<Name> key,
|
||||||
Handle<Object> value,
|
Handle<Object> value,
|
||||||
PropertyAttributes attributes,
|
PropertyAttributes attributes,
|
||||||
StoreFromKeyed store_mode = MAY_BE_STORE_FROM_KEYED,
|
|
||||||
ExecutableAccessorInfoHandling handling = DEFAULT_HANDLING);
|
ExecutableAccessorInfoHandling handling = DEFAULT_HANDLING);
|
||||||
|
|
||||||
static void AddProperty(Handle<JSObject> object, Handle<Name> key,
|
static void AddProperty(Handle<JSObject> object, Handle<Name> key,
|
||||||
|
@ -5042,16 +5042,14 @@ RUNTIME_FUNCTION(Runtime_DefineDataPropertyUnchecked) {
|
|||||||
isolate, result,
|
isolate, result,
|
||||||
JSObject::SetOwnPropertyIgnoreAttributes(
|
JSObject::SetOwnPropertyIgnoreAttributes(
|
||||||
js_object, name, obj_value, attr,
|
js_object, name, obj_value, attr,
|
||||||
JSReceiver::MAY_BE_STORE_FROM_KEYED, JSObject::DONT_FORCE_FIELD));
|
JSObject::DONT_FORCE_FIELD));
|
||||||
return *result;
|
return *result;
|
||||||
}
|
}
|
||||||
|
|
||||||
Handle<Object> result;
|
Handle<Object> result;
|
||||||
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
|
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
|
||||||
isolate, result,
|
isolate, result,
|
||||||
Runtime::DefineObjectProperty(
|
Runtime::DefineObjectProperty(js_object, name, obj_value, attr));
|
||||||
js_object, name, obj_value, attr,
|
|
||||||
JSReceiver::CERTAINLY_NOT_STORE_FROM_KEYED));
|
|
||||||
return *result;
|
return *result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5163,12 +5161,10 @@ MaybeHandle<Object> Runtime::SetObjectProperty(Isolate* isolate,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
MaybeHandle<Object> Runtime::DefineObjectProperty(
|
MaybeHandle<Object> Runtime::DefineObjectProperty(Handle<JSObject> js_object,
|
||||||
Handle<JSObject> js_object,
|
Handle<Object> key,
|
||||||
Handle<Object> key,
|
Handle<Object> value,
|
||||||
Handle<Object> value,
|
PropertyAttributes attr) {
|
||||||
PropertyAttributes attr,
|
|
||||||
JSReceiver::StoreFromKeyed store_from_keyed) {
|
|
||||||
Isolate* isolate = js_object->GetIsolate();
|
Isolate* isolate = js_object->GetIsolate();
|
||||||
// Check if the given key is an array index.
|
// Check if the given key is an array index.
|
||||||
uint32_t index;
|
uint32_t index;
|
||||||
@ -5196,7 +5192,7 @@ MaybeHandle<Object> Runtime::DefineObjectProperty(
|
|||||||
} else {
|
} else {
|
||||||
if (name->IsString()) name = String::Flatten(Handle<String>::cast(name));
|
if (name->IsString()) name = String::Flatten(Handle<String>::cast(name));
|
||||||
return JSObject::SetOwnPropertyIgnoreAttributes(js_object, name, value,
|
return JSObject::SetOwnPropertyIgnoreAttributes(js_object, name, value,
|
||||||
attr, store_from_keyed);
|
attr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5211,7 +5207,7 @@ MaybeHandle<Object> Runtime::DefineObjectProperty(
|
|||||||
SLOPPY, false, DEFINE_PROPERTY);
|
SLOPPY, false, DEFINE_PROPERTY);
|
||||||
} else {
|
} else {
|
||||||
return JSObject::SetOwnPropertyIgnoreAttributes(js_object, name, value,
|
return JSObject::SetOwnPropertyIgnoreAttributes(js_object, name, value,
|
||||||
attr, store_from_keyed);
|
attr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -826,12 +826,8 @@ class Runtime : public AllStatic {
|
|||||||
Handle<Object> value, StrictMode strict_mode);
|
Handle<Object> value, StrictMode strict_mode);
|
||||||
|
|
||||||
MUST_USE_RESULT static MaybeHandle<Object> DefineObjectProperty(
|
MUST_USE_RESULT static MaybeHandle<Object> DefineObjectProperty(
|
||||||
Handle<JSObject> object,
|
Handle<JSObject> object, Handle<Object> key, Handle<Object> value,
|
||||||
Handle<Object> key,
|
PropertyAttributes attr);
|
||||||
Handle<Object> value,
|
|
||||||
PropertyAttributes attr,
|
|
||||||
JSReceiver::StoreFromKeyed store_from_keyed =
|
|
||||||
JSReceiver::MAY_BE_STORE_FROM_KEYED);
|
|
||||||
|
|
||||||
MUST_USE_RESULT static MaybeHandle<Object> DeleteObjectProperty(
|
MUST_USE_RESULT static MaybeHandle<Object> DeleteObjectProperty(
|
||||||
Isolate* isolate,
|
Isolate* isolate,
|
||||||
|
Loading…
Reference in New Issue
Block a user