Bug 1244894: Steal the failed nsresult when bailing early. r=bz

--HG--
extra : rebase_source : 2edc5e7f69a7781c9e6889dc980dc80f6e11980a
This commit is contained in:
Kyle Huey 2016-02-05 10:12:25 -08:00
parent 3693241281
commit 2886d41044
3 changed files with 23 additions and 1 deletions

View File

@ -0,0 +1,21 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script>
function boom()
{
document.designMode = 'on';
document.execCommand("indent", false, null);
document.execCommand("insertText", false, "a");
document.execCommand("forwardDelete", false, null);
document.execCommand("justifyfull", false, null);
}
window.addEventListener("load", boom, false);
</script>
</head>
<body> <span class="v"></span></body><body><input type="file" /></body>
</html>

View File

@ -66,3 +66,4 @@ needs-focus load 1128787.html
load 1134545.html
load 1158452.html
load 1158651.html
load 1244894.xhtml

View File

@ -3837,7 +3837,7 @@ nsEditor::SplitNodeDeep(nsIContent& aNode,
didSplit = true;
ErrorResult rv;
nsCOMPtr<nsIContent> newLeftNode = SplitNode(nodeToSplit, offset, rv);
NS_ENSURE_TRUE(!rv.Failed(), -1);
NS_ENSURE_TRUE(!NS_FAILED(rv.StealNSResult()), -1);
rightNode = nodeToSplit;
leftNode = newLeftNode;