Bug 1025170 - Selection::Modify should return on failure. r=bz
authorAndrew McCreight <continuation@gmail.com>
Sat, 14 Jun 2014 16:43:46 -0700
changeset 188763 82418d47c4979d4089f1eeefb99b852fd1aaa792
parent 188762 7cafd3d4f0d7b8e037114b96518dde99665d4a44
child 188764 57f27c0396615eddf44fad520706ce5078ea2e0f
push id44910
push useramccreight@mozilla.com
push dateSat, 14 Jun 2014 23:44:20 +0000
treeherdermozilla-inbound@82418d47c497 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz
bugs1025170
milestone33.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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.