  
        if (!startContent) {
          // otherwise, just use the root content as the starting point
-         startContent = rootContent;
+@@ -2600,7 +2599,6 @@
          NS_ENSURE_TRUE(startContent, NS_OK);
        }
      }

   /**
    * Create a range
    *
    * @see http://html5.org/specs/dom-range.html#dom-document-createrange
    */
   nsIDOMRange              createRange();
 
   [optional_argc] nsIDOMNodeIterator createNodeIterator(in nsIDOMNode root,
diff --git a/dom/xbl/nsXBLContentSink.cpp b/dom/xbl/nsXBLContentSink.cpp
--- a/dom/xbl/nsXBLContentSink.cpp
+++ b/dom/xbl/nsXBLContentSink.cpp
@@ -163,16 +163,18 @@ nsXBLContentSink::FlushText(bool aReleas
 
   return nsXMLContentSink::FlushText(aReleaseTextNode);
 }
 
 NS_IMETHODIMP
 nsXBLContentSink::ReportError(const char16_t* aErrorText, 
                               const char16_t* aSourceText,
                               nsIScriptError *aError,

       NS_ENSURE_SUCCESS(res, res);
       item = mHTMLEditor->mTypeInState->TakeSetProperty();
     }
@@ -6875,6 +6838,9 @@
       res = mHTMLEditor->DeleteNode(aListItem);
       NS_ENSURE_SUCCESS(res, res);
 
