Bug 279330 part 1 - Remove erroneous NS_ERRORs; r=ehsan
authorAryeh Gregor <ayg@aryeh.name>
Tue, 17 Apr 2012 13:18:08 +0300
changeset 95158 52e2737720a568d2b378ee8429d2ce4d326ed67d
parent 95157 975341acf9f1f384e4ffe6601566f9daa92ed168
child 95159 459b7d9d63d7191604d92848f651c775df5e0ad9
push id886
push userlsblakk@mozilla.com
push dateMon, 04 Jun 2012 19:57:52 +0000
treeherdermozilla-beta@bbd8d5efd6d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersehsan
bugs279330
milestone14.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 279330 part 1 - Remove erroneous NS_ERRORs; r=ehsan
editor/txtsvc/src/nsTextServicesDocument.cpp
--- a/editor/txtsvc/src/nsTextServicesDocument.cpp
+++ b/editor/txtsvc/src/nsTextServicesDocument.cpp
@@ -1888,36 +1888,28 @@ nsTextServicesDocument::DidJoinNodes(nsI
   PRUint16 type;
   nsresult result;
 
   //**** KDEBUG ****
   // printf("** JoinNodes: 0x%.8x  0x%.8x  0x%.8x\n", aLeftNode, aRightNode, aParent);
   // fflush(stdout);
   //**** KDEBUG ****
 
-  // Make sure that both nodes are text nodes!
+  // Make sure that both nodes are text nodes -- otherwise we don't care.
 
   result = aLeftNode->GetNodeType(&type);
-
   NS_ENSURE_SUCCESS(result, false);
-
-  if (nsIDOMNode::TEXT_NODE != type)
-  {
-    NS_ERROR("JoinNode called with a non-text left node!");
-    return NS_ERROR_FAILURE;
+  if (nsIDOMNode::TEXT_NODE != type) {
+    return NS_OK;
   }
 
   result = aRightNode->GetNodeType(&type);
-
   NS_ENSURE_SUCCESS(result, false);
-
-  if (nsIDOMNode::TEXT_NODE != type)
-  {
-    NS_ERROR("JoinNode called with a non-text right node!");
-    return NS_ERROR_FAILURE;
+  if (nsIDOMNode::TEXT_NODE != type) {
+    return NS_OK;
   }
 
   // Note: The editor merges the contents of the left node into the
   //       contents of the right.
 
   PRInt32 leftIndex = 0;
   PRInt32 rightIndex = 0;
   bool leftHasEntry = false;