Verified Commit 3efe0919 authored by godotislate's avatar godotislate
Browse files

fix: #3572967 Renderer::executeInRenderContext() and BigPipe should also pass...

fix: #3572967 Renderer::executeInRenderContext() and BigPipe should also pass immediate as resume type

By: berdir
By: catch
By: godotislate
(cherry picked from commit 7f7a3e43)
parent 81400d48
Loading
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -643,7 +643,7 @@ public function executeInRenderContext(RenderContext $context, callable $callabl
        // before returning here.
        if (\Fiber::getCurrent() !== NULL) {
          $this->setCurrentRenderContext($previous_context);
          \Fiber::suspend();
          \Fiber::suspend(FiberResumeType::Immediate);
          $this->setCurrentRenderContext($context);
        }
        $resume_type = $fiber->resume();
@@ -779,7 +779,7 @@ protected function replacePlaceholders(array &$elements) {
          if ($iterations) {
            $fiber = \Fiber::getCurrent();
            if ($fiber !== NULL) {
              $fiber->suspend();
              $fiber->suspend(FiberResumeType::Immediate);
            }
          }
          continue;
+2 −1
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@
use Drupal\Core\Render\RendererInterface;
use Drupal\Core\Routing\LocalRedirectResponse;
use Drupal\Core\Routing\RequestContext;
use Drupal\Core\Utility\FiberResumeType;
use Psr\Log\LoggerInterface;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
@@ -518,7 +519,7 @@ protected function sendPlaceholders(array $placeholders, array $placeholder_orde
            if ($iterations) {
              $fiber = \Fiber::getCurrent();
              if ($fiber !== NULL) {
                $fiber->suspend();
                $fiber->suspend(FiberResumeType::Immediate);
              }
            }
            continue;