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

This commit is contained in:
roytam1 2023-02-01 07:43:04 +08:00
commit 5ee6b84d50
78 changed files with 3077 additions and 1727 deletions

View file

@ -543,7 +543,10 @@ void TraceScriptHolder(nsISupports* aHolder, JSTracer* aTracer);
// Returns true if the JS::TraceKind is one the cycle collector cares about.
inline bool AddToCCKind(JS::TraceKind aKind)
{
return aKind == JS::TraceKind::Object || aKind == JS::TraceKind::Script || aKind == JS::TraceKind::Scope;
return aKind == JS::TraceKind::Object ||
aKind == JS::TraceKind::Script ||
aKind == JS::TraceKind::Scope ||
aKind == JS::TraceKind::RegExpShared;
}
bool

View file

@ -623,13 +623,11 @@ TimerThread::AddTimerInternal(nsTimerImpl* aTimer)
return insertSlot - mTimers.Elements();
}
// This function must be called from within a lock.
// Also: we hold the mutex for the nsTimerImpl.
// Note: this function must be called from within a lock.
bool
TimerThread::RemoveTimerInternal(nsTimerImpl* aTimer)
{
mMonitor.AssertCurrentThreadOwns();
aTimer->mMutex.AssertCurrentThreadOwns();
if (!mTimers.RemoveElement(aTimer)) {
return false;
}