summaryrefslogtreecommitdiff
path: root/editor/libeditor/TextEditor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/libeditor/TextEditor.cpp')
-rw-r--r--editor/libeditor/TextEditor.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/editor/libeditor/TextEditor.cpp b/editor/libeditor/TextEditor.cpp
index 9d07c198b4..c3cfa4a721 100644
--- a/editor/libeditor/TextEditor.cpp
+++ b/editor/libeditor/TextEditor.cpp
@@ -913,7 +913,8 @@ TextEditor::GetDocumentIsEmpty(bool* aDocumentIsEmpty)
// Protect the edit rules object from dying
nsCOMPtr<nsIEditRules> rules(mRules);
- return rules->DocumentIsEmpty(aDocumentIsEmpty);
+ *aDocumentIsEmpty = rules->DocumentIsEmpty();
+ return NS_OK;
}
NS_IMETHODIMP
@@ -1580,8 +1581,7 @@ TextEditor::SelectEntireDocument(Selection* aSelection)
nsCOMPtr<nsIEditRules> rules(mRules);
// is doc empty?
- bool bDocIsEmpty;
- if (NS_SUCCEEDED(rules->DocumentIsEmpty(&bDocIsEmpty)) && bDocIsEmpty) {
+ if (rules->DocumentIsEmpty()) {
// get root node
nsCOMPtr<nsIDOMElement> rootElement = do_QueryInterface(GetRoot());
NS_ENSURE_TRUE(rootElement, NS_ERROR_FAILURE);