diff --git a/parser/htmlparser/src/moz.build b/parser/htmlparser/src/moz.build
index aa4fd8eec0ca..6e2674ceb956 100644
--- a/parser/htmlparser/src/moz.build
+++ b/parser/htmlparser/src/moz.build
@@ -24,6 +24,8 @@ SOURCES += [
LIBRARY_NAME = 'htmlpars'
+FAIL_ON_WARNINGS = True
+
LIBXUL_LIBRARY = True
EXPORT_LIBRARY = True