зеркало из https://github.com/mozilla/pjs.git
Bug 725499. r=bent
This commit is contained in:
Родитель
408ff6a6de
Коммит
f5f5ba1f2c
|
@ -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();
|
||||||
|
|
Загрузка…
Ссылка в новой задаче