From a80cb9b3a22b41523074f0c55c9bb467371c9368 Mon Sep 17 00:00:00 2001 From: Aryeh Gregor Date: Mon, 23 Jul 2012 13:27:22 +0300 Subject: [PATCH] Bug 776323 part 1 - Fix crash due to silly logic error in nsSelectionState::SaveSelection; r=ehsan --- editor/libeditor/base/crashtests/776323.html | 18 ++++++++++++++++++ .../libeditor/base/crashtests/crashtests.list | 1 + editor/libeditor/base/nsSelectionState.cpp | 4 +--- 3 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 editor/libeditor/base/crashtests/776323.html diff --git a/editor/libeditor/base/crashtests/776323.html b/editor/libeditor/base/crashtests/776323.html new file mode 100644 index 00000000000..9fc2776c371 --- /dev/null +++ b/editor/libeditor/base/crashtests/776323.html @@ -0,0 +1,18 @@ + + + + + + + diff --git a/editor/libeditor/base/crashtests/crashtests.list b/editor/libeditor/base/crashtests/crashtests.list index 17078b6e2c4..594dd90fb18 100644 --- a/editor/libeditor/base/crashtests/crashtests.list +++ b/editor/libeditor/base/crashtests/crashtests.list @@ -17,3 +17,4 @@ load 766845.xhtml load 768765.html needs-focus load 771749.html load 772282.html +load 776323.html diff --git a/editor/libeditor/base/nsSelectionState.cpp b/editor/libeditor/base/nsSelectionState.cpp index 13796e66818..d63e4f4aebe 100644 --- a/editor/libeditor/base/nsSelectionState.cpp +++ b/editor/libeditor/base/nsSelectionState.cpp @@ -57,9 +57,7 @@ nsSelectionState::SaveSelection(nsISelection *aSel) // if we need more items in the array, new them if (arrayCount