mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 05:11:16 +00:00
Bug 1331434 - Part 4: Return early after throwing in AccessibleNode::Get, r=surkov
MozReview-Commit-ID: GmzIhdwVjPj
This commit is contained in:
parent
1957fbfa92
commit
6cb8b40272
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user