This commit is contained in:
Kyle Huey 2012-05-14 11:29:41 -07:00
Родитель 408ff6a6de
Коммит f5f5ba1f2c
1 изменённых файлов: 3 добавлений и 0 удалений

Просмотреть файл

@ -1759,11 +1759,14 @@ WorkerRunnable::Run()
JSObject* targetCompartmentObject; JSObject* targetCompartmentObject;
nsIThreadJSContextStack* contextStack = nsnull; nsIThreadJSContextStack* contextStack = nsnull;
nsRefPtr<WorkerPrivate> kungFuDeathGrip;
if (mTarget == WorkerThread) { if (mTarget == WorkerThread) {
mWorkerPrivate->AssertIsOnWorkerThread(); mWorkerPrivate->AssertIsOnWorkerThread();
cx = mWorkerPrivate->GetJSContext(); cx = mWorkerPrivate->GetJSContext();
targetCompartmentObject = JS_GetGlobalObject(cx); targetCompartmentObject = JS_GetGlobalObject(cx);
} else { } else {
kungFuDeathGrip = mWorkerPrivate;
mWorkerPrivate->AssertIsOnParentThread(); mWorkerPrivate->AssertIsOnParentThread();
cx = mWorkerPrivate->ParentJSContext(); cx = mWorkerPrivate->ParentJSContext();
targetCompartmentObject = mWorkerPrivate->GetJSObject(); targetCompartmentObject = mWorkerPrivate->GetJSObject();