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<Object> value,
|
||||
PropertyAttributes attributes,
|
||||
StoreFromKeyed store_from_keyed,
|
||||
ExecutableAccessorInfoHandling handling) {
|
||||
DCHECK(!value->IsTheHole());
|
||||
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<Object> value,
|
||||
PropertyAttributes attributes,
|
||||
StoreFromKeyed store_mode = MAY_BE_STORE_FROM_KEYED,
|
||||
ExecutableAccessorInfoHandling handling = DEFAULT_HANDLING);
|
||||
|
||||
static void AddProperty(Handle<JSObject> object, Handle<Name> key,
|
||||
|
@ -5042,16 +5042,14 @@ RUNTIME_FUNCTION(Runtime_DefineDataPropertyUnchecked) {
|
||||
isolate, result,
|
||||
JSObject::SetOwnPropertyIgnoreAttributes(
|
||||
js_object, name, obj_value, attr,
|
||||
JSReceiver::MAY_BE_STORE_FROM_KEYED, JSObject::DONT_FORCE_FIELD));
|
||||
JSObject::DONT_FORCE_FIELD));
|
||||
return *result;
|
||||
}
|
||||
|
||||
Handle<Object> result;
|
||||
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
|
||||
isolate, result,
|
||||
Runtime::DefineObjectProperty(
|
||||
js_object, name, obj_value, attr,
|
||||
JSReceiver::CERTAINLY_NOT_STORE_FROM_KEYED));
|
||||
Runtime::DefineObjectProperty(js_object, name, obj_value, attr));
|
||||
return *result;
|
||||
}
|
||||
|
||||
@ -5163,12 +5161,10 @@ MaybeHandle<Object> Runtime::SetObjectProperty(Isolate* isolate,
|
||||
}
|
||||
|
||||
|
||||
MaybeHandle<Object> Runtime::DefineObjectProperty(
|
||||
Handle<JSObject> js_object,
|
||||
Handle<Object> key,
|
||||
Handle<Object> value,
|
||||
PropertyAttributes attr,
|
||||
JSReceiver::StoreFromKeyed store_from_keyed) {
|
||||
MaybeHandle<Object> Runtime::DefineObjectProperty(Handle<JSObject> js_object,
|
||||
Handle<Object> key,
|
||||
Handle<Object> value,
|
||||
PropertyAttributes attr) {
|
||||
Isolate* isolate = js_object->GetIsolate();
|
||||
// Check if the given key is an array index.
|
||||
uint32_t index;
|
||||
@ -5196,7 +5192,7 @@ MaybeHandle<Object> Runtime::DefineObjectProperty(
|
||||
} else {
|
||||
if (name->IsString()) name = String::Flatten(Handle<String>::cast(name));
|
||||
return JSObject::SetOwnPropertyIgnoreAttributes(js_object, name, value,
|
||||
attr, store_from_keyed);
|
||||
attr);
|
||||
}
|
||||
}
|
||||
|
||||
@ -5211,7 +5207,7 @@ MaybeHandle<Object> Runtime::DefineObjectProperty(
|
||||
SLOPPY, false, DEFINE_PROPERTY);
|
||||
} else {
|
||||
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);
|
||||
|
||||
MUST_USE_RESULT static MaybeHandle<Object> DefineObjectProperty(
|
||||
Handle<JSObject> object,
|
||||
Handle<Object> key,
|
||||
Handle<Object> value,
|
||||
PropertyAttributes attr,
|
||||
JSReceiver::StoreFromKeyed store_from_keyed =
|
||||
JSReceiver::MAY_BE_STORE_FROM_KEYED);
|
||||
Handle<JSObject> object, Handle<Object> key, Handle<Object> value,
|
||||
PropertyAttributes attr);
|
||||
|
||||
MUST_USE_RESULT static MaybeHandle<Object> DeleteObjectProperty(
|
||||
Isolate* isolate,
|
||||
|
Loading…
Reference in New Issue
Block a user