mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 23:02:20 +00:00
Bug 1244894: Steal the failed nsresult when bailing early. r=bz
--HG-- extra : rebase_source : 2edc5e7f69a7781c9e6889dc980dc80f6e11980a
This commit is contained in:
parent
3693241281
commit
2886d41044
21
editor/libeditor/crashtests/1244894.xhtml
Normal file
21
editor/libeditor/crashtests/1244894.xhtml
Normal 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>
|
@ -66,3 +66,4 @@ needs-focus load 1128787.html
|
||||
load 1134545.html
|
||||
load 1158452.html
|
||||
load 1158651.html
|
||||
load 1244894.xhtml
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user