[DOM] Try to avoid slow shrinking GC during sync calls.
parent
c3a1f44ba1
commit
882efd728c
|
@ -930,7 +930,7 @@ ImageBitmap::CreateInternal(nsIGlobalObject* aGlobal, ImageData& aImageData,
|
|||
const Maybe<IntRect>& aCropRect, ErrorResult& aRv)
|
||||
{
|
||||
// Copy data into SourceSurface.
|
||||
dom::Uint8ClampedArray array;
|
||||
RootedTypedArray<Uint8ClampedArray> array(RootingCx());
|
||||
DebugOnly<bool> inited = array.Init(aImageData.GetDataObject());
|
||||
MOZ_ASSERT(inited);
|
||||
|
||||
|
|
|
@ -6392,7 +6392,7 @@ WorkerPrivate::GarbageCollectInternal(JSContext* aCx, bool aShrinking,
|
|||
if (aShrinking || aCollectChildren) {
|
||||
JS::PrepareForFullGC(aCx);
|
||||
|
||||
if (aShrinking) {
|
||||
if (aShrinking && mSyncLoopStack.IsEmpty()) {
|
||||
JS::GCForReason(aCx, GC_SHRINK, JS::gcreason::DOM_WORKER);
|
||||
|
||||
if (!aCollectChildren) {
|
||||
|
|
Loading…
Reference in New Issue