-
-
Notifications
You must be signed in to change notification settings - Fork 8.9k
fix(suspense): clear placeholder and fallback el refs after resolved to enable GC #13928
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughClear GC-sensitive vnode references in Suspense: remove fallback vnode Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Async as Async dep / component
participant Suspense as Suspense boundary
participant Fallback as Fallback VNode (ssFallback)
participant Placeholder as Placeholder VNode
participant DOM as DOM
Note over Suspense,Async: Async dependency resolves / transitions complete
Async->>Suspense: resolve()
Suspense->>Suspense: determine isInFallback
alt delayed enter finished & in fallback
Suspense->>Fallback: clear `el` reference (fallback.el = null)
Suspense->>DOM: remove fallback/active nodes
else unmount active branch & in fallback
Suspense->>Fallback: clear `el` reference (fallback.el = null)
Suspense->>DOM: remove active branch nodes
end
Note over Suspense,Placeholder: removing placeholder during resolve
Suspense->>Placeholder: set `placeholder = null`
Suspense->>DOM: remove placeholder node
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Poem
Pre-merge checks and finishing touches✅ Passed checks (4 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
Size ReportBundles
Usages
|
@vue/compiler-core
@vue/compiler-dom
@vue/compiler-sfc
@vue/compiler-ssr
@vue/reactivity
@vue/runtime-core
@vue/runtime-dom
@vue/server-renderer
@vue/shared
vue
@vue/compat
commit: |
bd5f7a5 to
588de48
Compare
…/github.com/vuejs/core into pr/edison1105/13928
|
/ecosystem-ci run |
|
📝 Ran ecosystem CI: Open
|
fix #13732 (comment)
related PR #13560
Summary by CodeRabbit