Backed out changesets 92259dfdcbd6 and 67b9d435c57b (bug 832385) for xpcshell crashes/timeouts. a=backout
authorRyan VanderMeulen <ryanvm@gmail.com>
Fri, 25 Jan 2013 12:53:26 -0500
changeset 118304 324b933aec074ad27e110f151201e670bcfcb1a7
parent 118303 92259dfdcbd60050de75e3caa12e0f065aa59c7d
child 118305 b95c498e7d2c6fb07fcb6b621eb92888fb74221b
push id341
push userryanvm@gmail.com
push dateThu, 24 Jan 2013 17:52:28 +0000
reviewersbackout
bugs832385
milestone18.0
backs out92259dfdcbd60050de75e3caa12e0f065aa59c7d
67b9d435c57b0b88edbe05faeb46c2e9be91cd24
Backed out changesets 92259dfdcbd6 and 67b9d435c57b (bug 832385) for xpcshell crashes/timeouts. a=backout
content/base/src/nsContentUtils.cpp
dom/indexedDB/IDBWrapperCache.cpp
--- a/content/base/src/nsContentUtils.cpp
+++ b/content/base/src/nsContentUtils.cpp
@@ -4585,20 +4585,16 @@ nsContentUtils::HoldJSObjects(void* aScr
 
   return NS_OK;
 }
 
 /* static */
 nsresult
 nsContentUtils::DropJSObjects(void* aScriptObjectHolder)
 {
-  if (NS_UNLIKELY(!sXPConnect)) {
-    return NS_ERROR_UNEXPECTED;
-  }
-
   NS_LOG_RELEASE(sXPConnect, sJSGCThingRootCount - 1, "HoldJSObjects");
   nsresult rv = sXPConnect->RemoveJSHolder(aScriptObjectHolder);
   if (--sJSGCThingRootCount == 0) {
     nsLayoutStatics::Release();
   }
   return rv;
 }
 
--- a/dom/indexedDB/IDBWrapperCache.cpp
+++ b/dom/indexedDB/IDBWrapperCache.cpp
@@ -35,19 +35,19 @@ NS_IMPL_CYCLE_COLLECTION_TRACE_END
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(IDBWrapperCache)
 NS_INTERFACE_MAP_END_INHERITING(nsDOMEventTargetHelper)
 
 NS_IMPL_ADDREF_INHERITED(IDBWrapperCache, nsDOMEventTargetHelper)
 NS_IMPL_RELEASE_INHERITED(IDBWrapperCache, nsDOMEventTargetHelper)
 
 IDBWrapperCache::~IDBWrapperCache()
 {
-  mScriptOwner = nullptr;
-  nsContentUtils::ReleaseWrapper(this, this);
-  NS_DROP_JS_OBJECTS(this, IDBWrapperCache);
+  if (mScriptOwner) {
+    NS_DROP_JS_OBJECTS(this, IDBWrapperCache);
+  }
 }
 
 bool
 IDBWrapperCache::SetScriptOwner(JSObject* aScriptOwner)
 {
   NS_ASSERTION(aScriptOwner, "This should never be null!");
 
   mScriptOwner = aScriptOwner;