Bug 842272: Don't destroy SVGElementFactory's hash table if it was never initialized. r=dholbert
authorRobert Longson <longsonr@gmail.com>
Mon, 18 Feb 2013 11:35:30 -0800
changeset 122252 162a860a2b39a3c76bed87561dcf9520e77dabfc
parent 122251 3bd8f038263de01b208f4e320634c4b71e7ac965
child 122253 584660a01e6411e8c0089b900863b3514437dd57
push id24327
push usergszorc@mozilla.com
push dateTue, 19 Feb 2013 05:22:32 +0000
treeherdermozilla-central@e8f8a3f6f1f6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert
bugs842272
milestone21.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 842272: Don't destroy SVGElementFactory's hash table if it was never initialized. r=dholbert
content/svg/content/src/SVGElementFactory.cpp
--- a/content/svg/content/src/SVGElementFactory.cpp
+++ b/content/svg/content/src/SVGElementFactory.cpp
@@ -91,18 +91,20 @@ SVGElementFactory::Init()
 #include "SVGTagList.h"
 #undef SVG_TAG
 #undef SVG_FROM_PARSER_TAG
 }
 
 void
 SVGElementFactory::Shutdown()
 {
-  PL_HashTableDestroy(sTagAtomTable);
-  sTagAtomTable = nullptr;
+  if (sTagAtomTable) {
+    PL_HashTableDestroy(sTagAtomTable);
+    sTagAtomTable = nullptr;
+  }
 }
 
 nsresult
 NS_NewSVGElement(nsIContent** aResult, already_AddRefed<nsINodeInfo> aNodeInfo,
                  FromParser aFromParser)
 {
   NS_ASSERTION(sTagAtomTable, "no lookup table, needs SVGElementFactory::Init");