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,
}
accessors->set(is_getter, fun);
{ MaybeObject* maybe_ok = SetElementCallback(index, accessors, attributes);
if (maybe_ok->IsFailure()) return maybe_ok;
}
return GetHeap()->undefined_value();
return SetElementCallback(index, accessors, attributes);
}
......@@ -4478,10 +4475,7 @@ MaybeObject* JSObject::DefinePropertyAccessor(String* name,
}
copy->set(is_getter, fun);
// Use set to update attributes.
{ MaybeObject* maybe_ok = SetPropertyCallback(name, copy, attributes);
if (maybe_ok->IsFailure()) return maybe_ok;
}
return GetHeap()->undefined_value();
return SetPropertyCallback(name, copy, attributes);
}
}
}
......@@ -4492,10 +4486,7 @@ MaybeObject* JSObject::DefinePropertyAccessor(String* name,
}
accessors->set(is_getter, fun);
{ MaybeObject* maybe_ok = SetPropertyCallback(name, accessors, attributes);
if (maybe_ok->IsFailure()) return maybe_ok;
}
return GetHeap()->undefined_value();
return SetPropertyCallback(name, accessors, attributes);
}
......
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