commit a1d95c5fc49163f11b8aa7c4c44ce42a94700a77
Author: Jan de Mooij <jdemooij(a)mozilla.com>
Date: Wed Aug 6 15:23:33 2014 -0700
Bug 1041148 - Move HoldJSObjects call to XMLHttpRequest constructor to simplify the code. r=bz, a=lmandel
CLOSED TREE
---
dom/workers/XMLHttpRequest.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/dom/workers/XMLHttpRequest.cpp b/dom/workers/XMLHttpRequest.cpp
index 9299cad..f00dbd2 100644
--- a/dom/workers/XMLHttpRequest.cpp
+++ b/dom/workers/XMLHttpRequest.cpp
@@ -1412,6 +1412,8 @@ XMLHttpRequest::XMLHttpRequest(JSContext* aCx, WorkerPrivate* aWorkerPrivate)
mWithCredentials(false), mCanceled(false), mMozAnon(false), mMozSystem(false)
{
mWorkerPrivate->AssertIsOnWorkerThread();
+
+ mozilla::HoldJSObjects(this);
}
XMLHttpRequest::~XMLHttpRequest()