Merged
Conversation
📊 Tachometer Benchmark ResultsSummaryduration
usedJSHeapSize
Resultscreate10kduration
usedJSHeapSize
filter-listduration
usedJSHeapSize
hydrate1kduration
usedJSHeapSize
many-updatesduration
usedJSHeapSize
replace1kduration
usedJSHeapSize
run-warmup-0
run-warmup-1
run-warmup-2
run-warmup-3
run-warmup-4
run-final
text-updateduration
usedJSHeapSize
tododuration
usedJSHeapSize
update10th1kduration
usedJSHeapSize
|
|
Size Change: +80 B (+0.1%) Total Size: 79.3 kB
ℹ️ View Unchanged
|
JoviDeCroock
commented
Jan 19, 2026
| }); | ||
| }); | ||
|
|
||
| it('should not crash when suspended child updates after unmount', () => { |
Member
Author
There was a problem hiding this comment.
Uncommenting line 240 will surface the crash of this
6363cef to
c4514f6
Compare
Before this when we unmounted a vnode which was in a suspended state it was possible to cause this to render while being unmounted. One disturbing thing is that I wanted to check vnode._component._onResolve in the options.unmount hook, this however was not possible because somehow the reference to `_component` isn't being updated on the vnode that's actually unmounting. For this reason I opted to use a separate flag.
rschristian
approved these changes
Jan 20, 2026
| } from 'preact/compat'; | ||
| import { setupScratch, teardown } from '../../../test/_util/helpers'; | ||
| import { createLazy, createSuspender } from './suspense-utils'; | ||
| import { expect } from 'chai'; |
Member
Author
There was a problem hiding this comment.
Whups, darn vscode auto-import
Merged
JoviDeCroock
added a commit
that referenced
this pull request
Jan 31, 2026
* Fix suspense crash * Prevent unmounted suspended vnodes from rendering Before this when we unmounted a vnode which was in a suspended state it was possible to cause this to render while being unmounted. One disturbing thing is that I wanted to check vnode._component._onResolve in the options.unmount hook, this however was not possible because somehow the reference to `_component` isn't being updated on the vnode that's actually unmounting. For this reason I opted to use a separate flag.
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In the first commit we are resolving a suspense crash that happens when we do a state update on a component that is in a suspended state which has been unmounted.
In the second commit we resolve a forced remount of an unmounted component which resolves after unmount.
RE the second commit
Before this when we unmounted a vnode which was in a suspended state it was possible to cause this to render while being unmounted.
One disturbing thing is that I wanted to check
vnode._component._onResolvein theoptions.unmounthook, this however was not possible because somehow the reference to_componentisn't being updated on thevnode(my assumption is it being related to us cloning the vnode during the suspension) that's actually unmounting. For this reason I opted to use a separate flag.