Browse Source

Merge remote-tracking branch 'origin/master' into custom

custom
roytam1 2 months ago
parent
commit
220d2b4474
  1. 7
      dom/workers/WorkerPrivate.cpp
  2. 6
      mfbt/LinkedList.h

7
dom/workers/WorkerPrivate.cpp

@ -4339,6 +4339,11 @@ WorkerPrivate::Constructor(JSContext* aCx,
return nullptr;
}
// From this point on (worker thread has been started) we
// must keep ourself alive. We can now only be cleared by
// ClearSelfAndParentEventTargetRef().
worker->mSelfRef = worker;
worker->EnableDebugger();
RefPtr<CompileScriptRunnable> compiler =
@ -4348,8 +4353,6 @@ WorkerPrivate::Constructor(JSContext* aCx,
return nullptr;
}
worker->mSelfRef = worker;
return worker.forget();
}

6
mfbt/LinkedList.h

@ -327,7 +327,8 @@ private:
void setNextUnsafe(RawType aElem)
{
LinkedListElement *listElem = static_cast<LinkedListElement*>(aElem);
MOZ_ASSERT(!listElem->isInList());
if (listElem->isInList())
return;
listElem->mNext = this->mNext;
listElem->mPrev = this;
@ -344,7 +345,8 @@ private:
void setPreviousUnsafe(RawType aElem)
{
LinkedListElement<T>* listElem = static_cast<LinkedListElement<T>*>(aElem);
MOZ_ASSERT(!listElem->isInList());
if (listElem->isInList())
return;
listElem->mNext = this;
listElem->mPrev = this->mPrev;

Loading…
Cancel
Save