Commit d3b50cbb authored by jochen's avatar jochen Committed by Commit bot

Use Null as "no accessor" in AccessorPair instead of TheHole

R=verwaest@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/1949493004
Cr-Commit-Position: refs/heads/master@{#36020}
parent 566c825d
...@@ -190,8 +190,8 @@ Handle<OrderedHashMap> Factory::NewOrderedHashMap() { ...@@ -190,8 +190,8 @@ Handle<OrderedHashMap> Factory::NewOrderedHashMap() {
Handle<AccessorPair> Factory::NewAccessorPair() { Handle<AccessorPair> Factory::NewAccessorPair() {
Handle<AccessorPair> accessors = Handle<AccessorPair> accessors =
Handle<AccessorPair>::cast(NewStruct(ACCESSOR_PAIR_TYPE)); Handle<AccessorPair>::cast(NewStruct(ACCESSOR_PAIR_TYPE));
accessors->set_getter(*the_hole_value(), SKIP_WRITE_BARRIER); accessors->set_getter(*null_value(), SKIP_WRITE_BARRIER);
accessors->set_setter(*the_hole_value(), SKIP_WRITE_BARRIER); accessors->set_setter(*null_value(), SKIP_WRITE_BARRIER);
return accessors; return accessors;
} }
......
...@@ -9153,7 +9153,7 @@ Handle<Map> Map::TransitionToAccessorProperty(Handle<Map> map, ...@@ -9153,7 +9153,7 @@ Handle<Map> Map::TransitionToAccessorProperty(Handle<Map> map,
Object* current = Handle<AccessorPair>::cast(maybe_pair)->get(component); Object* current = Handle<AccessorPair>::cast(maybe_pair)->get(component);
if (current == *accessor) return map; if (current == *accessor) return map;
if (!current->IsTheHole()) { if (!current->IsNull()) {
return Map::Normalize(map, mode, "AccessorsOverwritingAccessors"); return Map::Normalize(map, mode, "AccessorsOverwritingAccessors");
} }
...@@ -9767,7 +9767,7 @@ Handle<Object> AccessorPair::GetComponent(Handle<AccessorPair> accessor_pair, ...@@ -9767,7 +9767,7 @@ Handle<Object> AccessorPair::GetComponent(Handle<AccessorPair> accessor_pair,
.ToHandleChecked(); .ToHandleChecked();
} }
Isolate* isolate = accessor_pair->GetIsolate(); Isolate* isolate = accessor_pair->GetIsolate();
if (accessor->IsTheHole()) { if (accessor->IsNull()) {
return isolate->factory()->undefined_value(); return isolate->factory()->undefined_value();
} }
return handle(accessor, isolate); return handle(accessor, isolate);
......
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