Simplified return values a bit when defining accessors.

Review URL: https://chromiumcodereview.appspot.com/9467005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@10824 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent c95aecb9
...@@ -4450,10 +4450,7 @@ MaybeObject* JSObject::DefineElementAccessor(uint32_t index, ...@@ -4450,10 +4450,7 @@ MaybeObject* JSObject::DefineElementAccessor(uint32_t index,
} }
accessors->set(is_getter, fun); accessors->set(is_getter, fun);
{ MaybeObject* maybe_ok = SetElementCallback(index, accessors, attributes); return SetElementCallback(index, accessors, attributes);
if (maybe_ok->IsFailure()) return maybe_ok;
}
return GetHeap()->undefined_value();
} }
...@@ -4478,10 +4475,7 @@ MaybeObject* JSObject::DefinePropertyAccessor(String* name, ...@@ -4478,10 +4475,7 @@ MaybeObject* JSObject::DefinePropertyAccessor(String* name,
} }
copy->set(is_getter, fun); copy->set(is_getter, fun);
// Use set to update attributes. // Use set to update attributes.
{ MaybeObject* maybe_ok = SetPropertyCallback(name, copy, attributes); return SetPropertyCallback(name, copy, attributes);
if (maybe_ok->IsFailure()) return maybe_ok;
}
return GetHeap()->undefined_value();
} }
} }
} }
...@@ -4492,10 +4486,7 @@ MaybeObject* JSObject::DefinePropertyAccessor(String* name, ...@@ -4492,10 +4486,7 @@ MaybeObject* JSObject::DefinePropertyAccessor(String* name,
} }
accessors->set(is_getter, fun); accessors->set(is_getter, fun);
{ MaybeObject* maybe_ok = SetPropertyCallback(name, accessors, attributes); return SetPropertyCallback(name, accessors, attributes);
if (maybe_ok->IsFailure()) return maybe_ok;
}
return GetHeap()->undefined_value();
} }
......
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