Skip to content
This repository has been archived by the owner on Apr 10, 2024. It is now read-only.

Commit

Permalink
Bug 725499. r=bent a=akeybl
Browse files Browse the repository at this point in the history
  • Loading branch information
khuey committed Jun 4, 2012
1 parent 2eb4e98 commit d81025b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dom/workers/WorkerPrivate.cpp
Expand Up @@ -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();
Expand Down

0 comments on commit d81025b

Please sign in to comment.