Bug 1025170 - Selection::Modify should return on failure. r=bz
authorAndrew McCreight <continuation@gmail.com>
Sat, 14 Jun 2014 16:43:46 -0700
changeset 188765 82418d47c4979d4089f1eeefb99b852fd1aaa792
parent 188764 7cafd3d4f0d7b8e037114b96518dde99665d4a44
child 188766 57f27c0396615eddf44fad520706ce5078ea2e0f
push idunknown
push userunknown
push dateunknown
reviewersbz
bugs1025170
milestone33.0a1
Bug 1025170 - Selection::Modify should return on failure. r=bz
layout/generic/nsSelection.cpp
--- a/layout/generic/nsSelection.cpp
+++ b/layout/generic/nsSelection.cpp
@@ -5707,16 +5707,17 @@ Selection::Modify(const nsAString& aAlte
                         (uint32_t) nsIDOMKeyEvent::DOM_VK_HOME;
   }
   else if (aGranularity.LowerCaseEqualsLiteral("sentence") ||
            aGranularity.LowerCaseEqualsLiteral("sentenceboundary") ||
            aGranularity.LowerCaseEqualsLiteral("paragraph") ||
            aGranularity.LowerCaseEqualsLiteral("paragraphboundary") ||
            aGranularity.LowerCaseEqualsLiteral("documentboundary")) {
     aRv.Throw(NS_ERROR_NOT_IMPLEMENTED);
+    return;
   }
   else {
     aRv.Throw(NS_ERROR_DOM_SYNTAX_ERR);
     return;
   }
 
   // If the anchor doesn't equal the focus and we try to move without first
   // collapsing the selection, MoveCaret will collapse the selection and quit.