mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-04 07:40:42 +00:00
Bug 1707630 - Fix the crash with a one line fix r=m_kato
For making it's upliftable, this patch just fixes the crash with a one line fix. Depends on D113282 Differential Revision: https://phabricator.services.mozilla.com/D113471
This commit is contained in:
parent
ce84c86379
commit
a6ae919f0e
@ -6770,7 +6770,7 @@ EditActionResult HTMLEditor::HandleInsertParagraphInParagraph(
|
||||
NS_WARNING_ASSERTION(
|
||||
brContent,
|
||||
"HTMLEditor::InsertBRElementWithTransaction() failed, but ignored");
|
||||
if (splitAfterNewBR) {
|
||||
if (splitAfterNewBR && brContent) {
|
||||
// We split the parent after the br we've just inserted.
|
||||
pointToSplitParentDivOrP.SetAfter(brContent);
|
||||
NS_WARNING_ASSERTION(pointToSplitParentDivOrP.IsSet(),
|
||||
|
16
editor/libeditor/crashtests/1707630.html
Normal file
16
editor/libeditor/crashtests/1707630.html
Normal file
@ -0,0 +1,16 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<script>
|
||||
window.addEventListener('load', () => {
|
||||
document = document
|
||||
document.documentElement = document.documentElement
|
||||
document.addEventListener('DOMNodeInserted', (e) => {
|
||||
e.currentTarget.removeChild(e.currentTarget.childNodes[(2731378636 % e.currentTarget.childNodes.length)])
|
||||
}, {})
|
||||
document.documentElement.contentEditable = true
|
||||
document.execCommand('insertParagraph', false, null)
|
||||
})
|
||||
</script>
|
||||
</head>
|
||||
</html>
|
@ -146,3 +146,4 @@ asserts(1) load 1677566.html # assertion in constructor of TextFragmentData (ini
|
||||
load 1691051.html
|
||||
load 1699866.html
|
||||
load 1701348.html
|
||||
load 1707630.html
|
||||
|
Loading…
x
Reference in New Issue
Block a user