diff --git a/mozilla/htmlparser/src/nsDTDUtils.cpp b/mozilla/htmlparser/src/nsDTDUtils.cpp
index b421383f8d7..be82152be3c 100644
--- a/mozilla/htmlparser/src/nsDTDUtils.cpp
+++ b/mozilla/htmlparser/src/nsDTDUtils.cpp
@@ -611,10 +611,10 @@ void DebugDumpContainmentRules(nsIDTD& theDTD,const char* aFilename,const char*
#define POLYNOMIAL 0x04c11db7L
+static PRBool crc_table_initialized;
static PRUint32 crc_table[256];
-static
-void gen_crc_table() {
+static void gen_crc_table() {
/* generate the table of CRC remainders for all possible bytes */
int i, j;
PRUint32 crc_accum;
@@ -630,16 +630,12 @@ void gen_crc_table() {
return;
}
-class CRCInitializer {
- public:
- CRCInitializer() {
- gen_crc_table();
- }
-};
-CRCInitializer gCRCInitializer;
-
-
PRUint32 AccumulateCRC(PRUint32 crc_accum, char *data_blk_ptr, int data_blk_size) {
+ if (!crc_table_initialized) {
+ gen_crc_table();
+ crc_table_initialized = PR_TRUE;
+ }
+
/* update the CRC on the data block one byte at a time */
int i, j;
for ( j = 0; j < data_blk_size; j++ ) {
diff --git a/mozilla/htmlparser/src/nsElementTable.cpp b/mozilla/htmlparser/src/nsElementTable.cpp
index 6133d742a35..e752e7fec0f 100644
--- a/mozilla/htmlparser/src/nsElementTable.cpp
+++ b/mozilla/htmlparser/src/nsElementTable.cpp
@@ -1208,29 +1208,6 @@ nsHTMLElement gHTMLElements[] = {
/*special parents,kids,skip*/ 0,0,eHTMLTag_unknown},
};
-/**
- * This class is here to finalize the initialization of the
- * nsHTMLElement table.
- */
-class CTableInitializer {
-public:
- CTableInitializer(){
-
- /*now initalize tags that can contain themselves...
- int max=sizeof(gStyleTags)/sizeof(eHTMLTag_unknown);
- for(index=0;index