bug: chrome crashes with "Aw, snap" message

Đang mở
#5,887 3 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
25/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
typescript
Lĩnh vực
frontend, web-dev

Hướng nghiên cứu

Bắt đầu với repository tái hiện chrome-crash được liên kết và chạy npm run start. Khi DevTools đang mở, hãy thực hiện các bước thay đổi kích thước và nhấp vào nút, sau đó điều tra sự kết hợp giữa việc chuyển đổi slot và display:none được hiển thị trong issue. Hoàn tất khi bản tái hiện không còn làm Chrome bị crash.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Bug: Validated Has Workaround Help Wanted
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

Ngôn ngữ chính
TypeScript
Star
13.2k
Fork
865
Merge trung bình
2 ngày 16 giờ
Pull request đã merge (30 ngày)
29

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của stenciljs/core

Tất cả issue của stenciljs/core

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.