From 41a970c5e79bf9d49fa4755db24d9e8563a5297d Mon Sep 17 00:00:00 2001 From: "verwaest@chromium.org" Date: Mon, 18 Aug 2014 14:38:44 +0000 Subject: [PATCH] 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 --- src/objects.cc | 4 ++-- src/objects.h | 1 - src/runtime.cc | 20 ++++++++------------ src/runtime.h | 8 ++------ 4 files changed, 12 insertions(+), 21 deletions(-) diff --git a/src/objects.cc b/src/objects.cc index eab3e2cc05..623e15939b 100644 --- a/src/objects.cc +++ b/src/objects.cc @@ -3894,7 +3894,6 @@ MaybeHandle JSObject::SetOwnPropertyIgnoreAttributes( Handle name, Handle 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 JSObject::SetOwnPropertyIgnoreAttributes( } } - return AddDataProperty(&it, value, attributes, STRICT, store_from_keyed); + return AddDataProperty(&it, value, attributes, STRICT, + CERTAINLY_NOT_STORE_FROM_KEYED); } diff --git a/src/objects.h b/src/objects.h index 3659e444b5..b2b73d0177 100644 --- a/src/objects.h +++ b/src/objects.h @@ -2140,7 +2140,6 @@ class JSObject: public JSReceiver { Handle key, Handle value, PropertyAttributes attributes, - StoreFromKeyed store_mode = MAY_BE_STORE_FROM_KEYED, ExecutableAccessorInfoHandling handling = DEFAULT_HANDLING); static void AddProperty(Handle object, Handle key, diff --git a/src/runtime.cc b/src/runtime.cc index 6dacbac453..926e0782d6 100644 --- a/src/runtime.cc +++ b/src/runtime.cc @@ -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 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 Runtime::SetObjectProperty(Isolate* isolate, } -MaybeHandle Runtime::DefineObjectProperty( - Handle js_object, - Handle key, - Handle value, - PropertyAttributes attr, - JSReceiver::StoreFromKeyed store_from_keyed) { +MaybeHandle Runtime::DefineObjectProperty(Handle js_object, + Handle key, + Handle 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 Runtime::DefineObjectProperty( } else { if (name->IsString()) name = String::Flatten(Handle::cast(name)); return JSObject::SetOwnPropertyIgnoreAttributes(js_object, name, value, - attr, store_from_keyed); + attr); } } @@ -5211,7 +5207,7 @@ MaybeHandle Runtime::DefineObjectProperty( SLOPPY, false, DEFINE_PROPERTY); } else { return JSObject::SetOwnPropertyIgnoreAttributes(js_object, name, value, - attr, store_from_keyed); + attr); } } diff --git a/src/runtime.h b/src/runtime.h index 2ef6d8009f..81b12b189d 100644 --- a/src/runtime.h +++ b/src/runtime.h @@ -826,12 +826,8 @@ class Runtime : public AllStatic { Handle value, StrictMode strict_mode); MUST_USE_RESULT static MaybeHandle DefineObjectProperty( - Handle object, - Handle key, - Handle value, - PropertyAttributes attr, - JSReceiver::StoreFromKeyed store_from_keyed = - JSReceiver::MAY_BE_STORE_FROM_KEYED); + Handle object, Handle key, Handle value, + PropertyAttributes attr); MUST_USE_RESULT static MaybeHandle DeleteObjectProperty( Isolate* isolate,