Remove HolderIsNonGlobalHiddenPrototype since OWN* now also checks globals

BUG=
R=mvstanton@chromium.org

Review URL: https://codereview.chromium.org/502903002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23351 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
verwaest@chromium.org 2014-08-25 11:47:31 +00:00
parent be0d658d61
commit 46ac7c2cc1
4 changed files with 2 additions and 15 deletions

View File

@ -23,7 +23,7 @@ JSReceiver* LookupIterator::NextHolder(Map* map) {
!(check_hidden() && next->map()->is_hidden_prototype()) && !(check_hidden() && next->map()->is_hidden_prototype()) &&
// Always lookup behind the JSGlobalProxy into the JSGlobalObject, even // Always lookup behind the JSGlobalProxy into the JSGlobalObject, even
// when not checking other hidden prototypes. // when not checking other hidden prototypes.
!(map->IsJSGlobalProxyMap() && next->IsJSGlobalObject())) { !map->IsJSGlobalProxyMap()) {
return NULL; return NULL;
} }

View File

@ -273,16 +273,6 @@ bool LookupIterator::HolderIsReceiverOrHiddenPrototype() const {
} }
bool LookupIterator::HolderIsNonGlobalHiddenPrototype() const {
if (!HolderIsReceiverOrHiddenPrototype()) return false;
Handle<Object> receiver = GetReceiver();
Handle<JSReceiver> holder = GetHolder<JSReceiver>();
if (receiver.is_identical_to(holder)) return false;
if (receiver->IsJSGlobalProxy()) return !holder->IsJSGlobalObject();
return true;
}
Handle<Object> LookupIterator::FetchValue() const { Handle<Object> LookupIterator::FetchValue() const {
Object* result = NULL; Object* result = NULL;
Handle<JSObject> holder = GetHolder<JSObject>(); Handle<JSObject> holder = GetHolder<JSObject>();

View File

@ -100,7 +100,6 @@ class LookupIterator V8_FINAL BASE_EMBEDDED {
state_ = NOT_FOUND; state_ = NOT_FOUND;
} }
Heap* heap() const { return isolate_->heap(); }
Factory* factory() const { return isolate_->factory(); } Factory* factory() const { return isolate_->factory(); }
Handle<Object> GetReceiver() const { Handle<Object> GetReceiver() const {
return maybe_receiver_.ToHandleChecked(); return maybe_receiver_.ToHandleChecked();
@ -118,7 +117,6 @@ class LookupIterator V8_FINAL BASE_EMBEDDED {
} }
Handle<JSReceiver> GetRoot() const; Handle<JSReceiver> GetRoot() const;
bool HolderIsReceiverOrHiddenPrototype() const; bool HolderIsReceiverOrHiddenPrototype() const;
bool HolderIsNonGlobalHiddenPrototype() const;
/* ACCESS_CHECK */ /* ACCESS_CHECK */
bool HasAccess(v8::AccessType access_type) const; bool HasAccess(v8::AccessType access_type) const;

View File

@ -3812,7 +3812,7 @@ MaybeHandle<Object> JSObject::SetOwnPropertyIgnoreAttributes(
PropertyAttributes attributes, PropertyAttributes attributes,
ExecutableAccessorInfoHandling handling) { ExecutableAccessorInfoHandling handling) {
DCHECK(!value->IsTheHole()); DCHECK(!value->IsTheHole());
LookupIterator it(object, name, LookupIterator::HIDDEN_SKIP_INTERCEPTOR); LookupIterator it(object, name, LookupIterator::OWN_SKIP_INTERCEPTOR);
bool is_observed = object->map()->is_observed() && bool is_observed = object->map()->is_observed() &&
*name != it.isolate()->heap()->hidden_string(); *name != it.isolate()->heap()->hidden_string();
for (; it.IsFound(); it.Next()) { for (; it.IsFound(); it.Next()) {
@ -3831,7 +3831,6 @@ MaybeHandle<Object> JSObject::SetOwnPropertyIgnoreAttributes(
case LookupIterator::PROPERTY: { case LookupIterator::PROPERTY: {
if (!it.HasProperty()) break; if (!it.HasProperty()) break;
if (it.HolderIsNonGlobalHiddenPrototype()) break;
PropertyDetails details = it.property_details(); PropertyDetails details = it.property_details();
Handle<Object> old_value = it.isolate()->factory()->the_hole_value(); Handle<Object> old_value = it.isolate()->factory()->the_hole_value();
switch (it.property_kind()) { switch (it.property_kind()) {