Bug 1331434 - Part 4: Return early after throwing in AccessibleNode::Get, r=surkov

MozReview-Commit-ID: GmzIhdwVjPj
This commit is contained in:
Michael Layzell 2017-02-28 14:43:50 -05:00
parent 1957fbfa92
commit 6cb8b40272

View File

@ -154,6 +154,7 @@ AccessibleNode::Get(JSContext* aCX, const nsAString& aAttribute,
{
if (!mIntl) {
aRv.Throw(NS_ERROR_DOM_INVALID_STATE_ERR);
return;
}
nsCOMPtr<nsIPersistentProperties> attrs = mIntl->Attributes();
@ -163,6 +164,7 @@ AccessibleNode::Get(JSContext* aCX, const nsAString& aAttribute,
JS::Rooted<JS::Value> jsval(aCX);
if (!ToJSValue(aCX, value, &jsval)) {
aRv.Throw(NS_ERROR_UNEXPECTED);
return;
}
aValue.set(jsval);