Bug 716630 - Kill editor's warnings; r=ehsan

This commit is contained in:
Ms2ger 2012-01-11 09:22:16 +01:00
parent 01813b69e4
commit 2e0c12b87c
13 changed files with 27 additions and 11 deletions

View File

@ -39,6 +39,7 @@ DEPTH = ..
topsrcdir = @top_srcdir@ topsrcdir = @top_srcdir@
srcdir = @srcdir@ srcdir = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
FAIL_ON_WARNINGS = 1
include $(DEPTH)/config/autoconf.mk include $(DEPTH)/config/autoconf.mk

View File

@ -39,6 +39,7 @@ DEPTH = ../../..
topsrcdir = @top_srcdir@ topsrcdir = @top_srcdir@
srcdir = @srcdir@ srcdir = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
FAIL_ON_WARNINGS = 1
include $(DEPTH)/config/autoconf.mk include $(DEPTH)/config/autoconf.mk

View File

@ -39,6 +39,7 @@ DEPTH = ../../..
topsrcdir = @top_srcdir@ topsrcdir = @top_srcdir@
srcdir = @srcdir@ srcdir = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
FAIL_ON_WARNINGS = 1
include $(DEPTH)/config/autoconf.mk include $(DEPTH)/config/autoconf.mk

View File

@ -39,6 +39,7 @@ DEPTH = ../../..
topsrcdir = @top_srcdir@ topsrcdir = @top_srcdir@
srcdir = @srcdir@ srcdir = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
FAIL_ON_WARNINGS = 1
include $(DEPTH)/config/autoconf.mk include $(DEPTH)/config/autoconf.mk

View File

@ -9277,8 +9277,10 @@ nsHTMLEditRules::DocumentModifiedWorker()
nsCOMPtr<nsIHTMLEditor> kungFuDeathGrip(mHTMLEditor); nsCOMPtr<nsIHTMLEditor> kungFuDeathGrip(mHTMLEditor);
nsCOMPtr<nsISelection> selection; nsCOMPtr<nsISelection> selection;
nsresult res = mHTMLEditor->GetSelection(getter_AddRefs(selection)); nsresult rv = mHTMLEditor->GetSelection(getter_AddRefs(selection));
NS_ENSURE_SUCCESS(res, ); if (NS_FAILED(rv)) {
return;
}
// Delete our bogus node, if we have one, since the document might not be // Delete our bogus node, if we have one, since the document might not be
// empty any more. // empty any more.

View File

@ -5740,16 +5740,21 @@ nsHTMLEditor::ResetRootElementAndEventTarget()
RemoveEventListeners(); RemoveEventListeners();
mRootElement = nsnull; mRootElement = nsnull;
nsresult rv = InstallEventListeners(); nsresult rv = InstallEventListeners();
NS_ENSURE_SUCCESS(rv, ); if (NS_FAILED(rv)) {
return;
}
// We must have mRootElement now. // We must have mRootElement now.
nsCOMPtr<nsIDOMElement> root; nsCOMPtr<nsIDOMElement> root;
rv = GetRootElement(getter_AddRefs(root)); rv = GetRootElement(getter_AddRefs(root));
NS_ENSURE_SUCCESS(rv, ); if (NS_FAILED(rv) || !mRootElement) {
NS_ENSURE_TRUE(mRootElement, ); return;
}
rv = BeginningOfDocument(); rv = BeginningOfDocument();
NS_ENSURE_SUCCESS(rv, ); if (NS_FAILED(rv)) {
return;
}
// When this editor has focus, we need to reset the selection limiter to // When this editor has focus, we need to reset the selection limiter to
// new root. Otherwise, that is going to be done when this gets focus. // new root. Otherwise, that is going to be done when this gets focus.

View File

@ -1853,6 +1853,7 @@ nsWSRunObject::GetAsciiWSBounds(PRInt16 aDir, nsIDOMNode *aNode, PRInt32 aOffset
nsresult nsresult
nsWSRunObject::FindRun(nsIDOMNode *aNode, PRInt32 aOffset, WSFragment **outRun, bool after) nsWSRunObject::FindRun(nsIDOMNode *aNode, PRInt32 aOffset, WSFragment **outRun, bool after)
{ {
*outRun = nsnull;
// given a dompoint, find the ws run that is before or after it, as caller needs // given a dompoint, find the ws run that is before or after it, as caller needs
NS_ENSURE_TRUE(aNode && outRun, NS_ERROR_NULL_POINTER); NS_ENSURE_TRUE(aNode && outRun, NS_ERROR_NULL_POINTER);

View File

@ -39,6 +39,7 @@ DEPTH = ../../..
topsrcdir = @top_srcdir@ topsrcdir = @top_srcdir@
srcdir = @srcdir@ srcdir = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
FAIL_ON_WARNINGS = 1
include $(DEPTH)/config/autoconf.mk include $(DEPTH)/config/autoconf.mk

View File

@ -39,6 +39,7 @@ DEPTH = ../../..
topsrcdir = @top_srcdir@ topsrcdir = @top_srcdir@
srcdir = @srcdir@ srcdir = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
FAIL_ON_WARNINGS = 1
include $(DEPTH)/config/autoconf.mk include $(DEPTH)/config/autoconf.mk

View File

@ -40,6 +40,7 @@ DEPTH = ../../..
topsrcdir = @top_srcdir@ topsrcdir = @top_srcdir@
srcdir = @srcdir@ srcdir = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
FAIL_ON_WARNINGS = 1
include $(DEPTH)/config/autoconf.mk include $(DEPTH)/config/autoconf.mk

View File

@ -4702,7 +4702,7 @@ aggregation_batch_stress_test()
// //
// 500 iterations sends 2,630,250 transactions through the system!! // 500 iterations sends 2,630,250 transactions through the system!!
// //
iterations = 500 500
#endif #endif
; ;
return stress_test(&factory, iterations); return stress_test(&factory, iterations);

View File

@ -39,6 +39,7 @@ DEPTH = ../../..
topsrcdir = @top_srcdir@ topsrcdir = @top_srcdir@
srcdir = @srcdir@ srcdir = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
FAIL_ON_WARNINGS = 1
include $(DEPTH)/config/autoconf.mk include $(DEPTH)/config/autoconf.mk

View File

@ -3263,11 +3263,11 @@ nsTextServicesDocument::ComparePoints(nsIDOMNode* aParent1, PRInt32 aOffset1,
nsIDOMNode* aParent2, PRInt32 aOffset2, nsIDOMNode* aParent2, PRInt32 aOffset2,
PRInt32 *aResult) PRInt32 *aResult)
{ {
nsresult result; *aResult = 0;
if (!sRangeHelper) { if (!sRangeHelper) {
result = CallGetService("@mozilla.org/content/range-utils;1", nsresult result = CallGetService("@mozilla.org/content/range-utils;1",
&sRangeHelper); &sRangeHelper);
NS_ENSURE_TRUE(sRangeHelper, result); NS_ENSURE_TRUE(sRangeHelper, result);
} }