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;
nsIThreadJSContextStack* contextStack = nsnull;
nsRefPtr<WorkerPrivate> kungFuDeathGrip;
if (mTarget == WorkerThread) {
mWorkerPrivate->AssertIsOnWorkerThread();
cx = mWorkerPrivate->GetJSContext();
targetCompartmentObject = JS_GetGlobalObject(cx);
} else {
kungFuDeathGrip = mWorkerPrivate;
mWorkerPrivate->AssertIsOnParentThread();
cx = mWorkerPrivate->ParentJSContext();
targetCompartmentObject = mWorkerPrivate->GetJSObject();