Commit 46ac7c2c authored by verwaest@chromium.org's avatar verwaest@chromium.org

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
parent be0d658d
......@@ -23,7 +23,7 @@ JSReceiver* LookupIterator::NextHolder(Map* map) {
!(check_hidden() && next->map()->is_hidden_prototype()) &&
// Always lookup behind the JSGlobalProxy into the JSGlobalObject, even
// when not checking other hidden prototypes.
!(map->IsJSGlobalProxyMap() && next->IsJSGlobalObject())) {
!map->IsJSGlobalProxyMap()) {
return NULL;
}
......
......@@ -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 {
Object* result = NULL;
Handle<JSObject> holder = GetHolder<JSObject>();
......
......@@ -100,7 +100,6 @@ class LookupIterator V8_FINAL BASE_EMBEDDED {
state_ = NOT_FOUND;
}
Heap* heap() const { return isolate_->heap(); }
Factory* factory() const { return isolate_->factory(); }
Handle<Object> GetReceiver() const {
return maybe_receiver_.ToHandleChecked();
......@@ -118,7 +117,6 @@ class LookupIterator V8_FINAL BASE_EMBEDDED {
}
Handle<JSReceiver> GetRoot() const;
bool HolderIsReceiverOrHiddenPrototype() const;
bool HolderIsNonGlobalHiddenPrototype() const;
/* ACCESS_CHECK */
bool HasAccess(v8::AccessType access_type) const;
......
......@@ -3812,7 +3812,7 @@ MaybeHandle<Object> JSObject::SetOwnPropertyIgnoreAttributes(
PropertyAttributes attributes,
ExecutableAccessorInfoHandling handling) {
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() &&
*name != it.isolate()->heap()->hidden_string();
for (; it.IsFound(); it.Next()) {
......@@ -3831,7 +3831,6 @@ MaybeHandle<Object> JSObject::SetOwnPropertyIgnoreAttributes(
case LookupIterator::PROPERTY: {
if (!it.HasProperty()) break;
if (it.HolderIsNonGlobalHiddenPrototype()) break;
PropertyDetails details = it.property_details();
Handle<Object> old_value = it.isolate()->factory()->the_hole_value();
switch (it.property_kind()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment