| 604 | |
| 605 | auto disableAnimationRemoveOnCompleteIos = |
| 606 | runtimeTweaks != nullptr ? runtimeTweaks->disableAnimationRemoveOnCompleteIos() : false; |
| 607 | auto applyManagedChildFramePadding = |
| 608 | runtimeTweaks != nullptr ? runtimeTweaks->applyManagedChildFramePadding() : true; |
| 609 | for (const auto& viewManagerContext : _viewManagerContexts) { |
| 610 | viewManagerContext->getViewManager().setDisableAnimationRemoveOnCompleteIos( |
| 611 | disableAnimationRemoveOnCompleteIos); |
| 612 | viewManagerContext->setApplyManagedChildFramePadding(applyManagedChildFramePadding); |
| 613 | } |
| 614 | |
| 615 | for (const auto& runtime : runtimes) { |
| 616 | runtime->setRuntimeTweaks(runtimeTweaks); |
| 617 | } |
| 618 | } |
| 619 | |
| 620 | void RuntimeManager::cancelDeferredGCTask() { |
| 621 | const auto previousTaskID = swapDeferredGCTask(DispatchQueue::TaskIDNull); |
| 622 | if (previousTaskID != DispatchQueue::TaskIDNull) { |
| 623 | _workerQueue->cancel(previousTaskID); |
| 624 | } |
| 625 | } |
| 626 | |
| 627 | void RuntimeManager::scheduleDeferredGCTask() { |
| 628 | auto weakThis = weakRef(this); |
| 629 | const auto taskID = _workerQueue->asyncAfter( |
| 630 | [weakThis]() { |
| 631 | auto strongThis = weakThis.lock(); |
| 632 | if (!strongThis) { |
| 633 | return; |
| 634 | } |
| 635 | const auto runtimes = strongThis->getAllRuntimes(); |
nothing calls this directly
no test coverage detected