stenciljs/core

bug: chrome crashes with "Aw, snap" message

Open

#5.887 aberto em 5 de jul. de 2024

Ver no GitHub
 (3 comments) (0 reactions) (0 assignees)TypeScript (844 forks)auto 404
Bug: ValidatedHas WorkaroundHelp Wanted

Métricas do repositório

Stars
 (13.111 stars)
Métricas de merge de PR
 (Métricas PR pendentes)

Description

Prerequisites

Stencil Version

4.19.2

Current Behavior

Chrome crash after toggle between <slot> elements With DevTools open I can reproduce it 100%, but sometimes it happens also without DevTools open but for this case I dont have a reproducible repo.

Repo: https://github.com/danielleroux/chrome-crash

Problem is related to toggle a <slot>

Component A render function

{this.doTheCrash ? (
          <div>
            Desktop
            <slot></slot>
          </div>
        ) : (
          <comp-b>
            Mobile
            <slot></slot>
          </comp-b>

and the Host class with combination of display: none

component B render function

      <Host
        class={{
          show: false,
        }}
      >
        <slot></slot>
      </Host>

CSS:

:host(:not(.show)) {
  display: none;
}

Expected Behavior

Not to crash the chrome instance

System Info

System: macOS
Chrome: Version 126.0.6478.127 (Official Build) (arm64)

Steps to Reproduce

Checkout repo: https://github.com/danielleroux/chrome-crash

  1. npm run start
  2. Open Browser with DevTools
  3. Resize
  4. Click the button (maybe multiple times if not resized correctly)

Code Reproduction URL

https://github.com/danielleroux/chrome-crash

Additional Information

https://github.com/ionic-team/stencil/assets/2144313/fd4157d0-5ca7-4a7d-831f-86a8bd860ba7

Guia do colaborador