mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-31 11:37:30 +09:00
[DOM] Try to avoid slow shrinking GC during sync calls
This commit is contained in:
parent
1835a24351
commit
8630e4f6dc
2 changed files with 2 additions and 2 deletions
|
|
@ -930,7 +930,7 @@ ImageBitmap::CreateInternal(nsIGlobalObject* aGlobal, ImageData& aImageData,
|
||||||
const Maybe<IntRect>& aCropRect, ErrorResult& aRv)
|
const Maybe<IntRect>& aCropRect, ErrorResult& aRv)
|
||||||
{
|
{
|
||||||
// Copy data into SourceSurface.
|
// Copy data into SourceSurface.
|
||||||
dom::Uint8ClampedArray array;
|
RootedTypedArray<Uint8ClampedArray> array(RootingCx());
|
||||||
DebugOnly<bool> inited = array.Init(aImageData.GetDataObject());
|
DebugOnly<bool> inited = array.Init(aImageData.GetDataObject());
|
||||||
MOZ_ASSERT(inited);
|
MOZ_ASSERT(inited);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6392,7 +6392,7 @@ WorkerPrivate::GarbageCollectInternal(JSContext* aCx, bool aShrinking,
|
||||||
if (aShrinking || aCollectChildren) {
|
if (aShrinking || aCollectChildren) {
|
||||||
JS::PrepareForFullGC(aCx);
|
JS::PrepareForFullGC(aCx);
|
||||||
|
|
||||||
if (aShrinking) {
|
if (aShrinking && mSyncLoopStack.IsEmpty()) {
|
||||||
JS::GCForReason(aCx, GC_SHRINK, JS::gcreason::DOM_WORKER);
|
JS::GCForReason(aCx, GC_SHRINK, JS::gcreason::DOM_WORKER);
|
||||||
|
|
||||||
if (!aCollectChildren) {
|
if (!aCollectChildren) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue