Fix: dynamic modifier tag not cleared when instance becomes undefined#21377
Draft
Fix: dynamic modifier tag not cleared when instance becomes undefined#21377
Conversation
…mes undefined Agent-Logs-Url: https://github.com/emberjs/ember.js/sessions/c1b037b4-d2f5-447c-b42a-5f5cb9387234 Co-authored-by: NullVoxPopuli <199018+NullVoxPopuli@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix cannot destructure property 'manager' of '.for' as it is undefined
Fix: dynamic modifier tag not cleared when instance becomes undefined
May 6, 2026
Contributor
📊 Size reportTarball size — dist/dev 0.01%↑
dist/prod 0.01%↑
smoke-tests/v2-app-hello-world-template/dist 0.01%↑
🤖 This report was automatically generated by wyvox/pkg-size |
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.
When a dynamic modifier conditionally becomes
undefined(e.g.{{(if cond myModifier)}}), theUpdateDynamicModifierOpcodecorrectly nulledthis.instancebut leftthis.tagpointing at the destroyed instance's tag. On the next render, if that stale tag was invalidated by an arg change, theelse ifbranch firedscheduleUpdateModifier(instance!)withinstance === undefined, producing:The error is especially triggered when arguments are passed to a component that uses a modifier — the arg change invalidates the stale tag while the modifier is disabled.
Changes
packages/@glimmer/runtime/lib/compiled/opcodes/dom.ts— InUpdateDynamicModifierOpcode.evaluate(), reset both the localtagvariable andthis.tagtonullwhennewInstanceisundefined:packages/@glimmer-workspace/integration-tests/test/modifiers/dynamic-modifiers-test.ts— Adds a regression test covering: install modifier → disable viaif→ change args → re-enable.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
accounts.google.com/proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --ignore-certificate-errors --use-angle=swiftshader-webgl --mute-audio --ignore-certificate-errors --crashpad-handler-pid=4936 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/testem-6392411320686-6hBVmX --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,9827928193251718403,1265053761173172249,262144 --disable-features=PaintHolding --variations-seed-version(dns block)/opt/google/chrome/chrome /usr/bin/google-chrome --no-sandbox --headless --disable-dev-shm-usage --disable-software-rasterizer --mute-audio --remote-debugging-port=0 --window-size=1440,900 --user-data-dir=/tmp/testem-6392411320686-6hBVmX --no-default-browser-check --no-first-run --ignore-certificate-errors --test-type --disable-renderer-REDACTEDing --disable-REDACTED-timer-throttling REDACTED(dns block)/proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --ignore-certificate-errors --use-angle=swiftshader-webgl --mute-audio --ignore-certificate-errors --crashpad-handler-pid=5696 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/testem-6924272276592-s2Io6S --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,7409941703946872075,11366128499208713936,262144 --disable-features=PaintHolding --variations-seed-version(dns block)android.clients.google.com/proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --ignore-certificate-errors --use-angle=swiftshader-webgl --mute-audio --ignore-certificate-errors --crashpad-handler-pid=4936 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/testem-6392411320686-6hBVmX --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,9827928193251718403,1265053761173172249,262144 --disable-features=PaintHolding --variations-seed-version(dns block)/opt/google/chrome/chrome /usr/bin/google-chrome --no-sandbox --headless --disable-dev-shm-usage --disable-software-rasterizer --mute-audio --remote-debugging-port=0 --window-size=1440,900 --user-data-dir=/tmp/testem-6392411320686-6hBVmX --no-default-browser-check --no-first-run --ignore-certificate-errors --test-type --disable-renderer-REDACTEDing --disable-REDACTED-timer-throttling REDACTED(dns block)/proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --ignore-certificate-errors --use-angle=swiftshader-webgl --mute-audio --ignore-certificate-errors --crashpad-handler-pid=5696 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/testem-6924272276592-s2Io6S --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,7409941703946872075,11366128499208713936,262144 --disable-features=PaintHolding --variations-seed-version(dns block)clients2.google.com/proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --ignore-certificate-errors --use-angle=swiftshader-webgl --mute-audio --ignore-certificate-errors --crashpad-handler-pid=4936 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/testem-6392411320686-6hBVmX --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,9827928193251718403,1265053761173172249,262144 --disable-features=PaintHolding --variations-seed-version(dns block)/opt/google/chrome/chrome /usr/bin/google-chrome --no-sandbox --headless --disable-dev-shm-usage --disable-software-rasterizer --mute-audio --remote-debugging-port=0 --window-size=1440,900 --user-data-dir=/tmp/testem-6392411320686-6hBVmX --no-default-browser-check --no-first-run --ignore-certificate-errors --test-type --disable-renderer-REDACTEDing --disable-REDACTED-timer-throttling REDACTED(dns block)/proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --ignore-certificate-errors --use-angle=swiftshader-webgl --mute-audio --ignore-certificate-errors --crashpad-handler-pid=5696 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/testem-6924272276592-s2Io6S --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,7409941703946872075,11366128499208713936,262144 --disable-features=PaintHolding --variations-seed-version(dns block)clientservices.googleapis.com/proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --ignore-certificate-errors --use-angle=swiftshader-webgl --mute-audio --ignore-certificate-errors --crashpad-handler-pid=4936 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/testem-6392411320686-6hBVmX --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,9827928193251718403,1265053761173172249,262144 --disable-features=PaintHolding --variations-seed-version(dns block)/opt/google/chrome/chrome /usr/bin/google-chrome --no-sandbox --headless --disable-dev-shm-usage --disable-software-rasterizer --mute-audio --remote-debugging-port=0 --window-size=1440,900 --user-data-dir=/tmp/testem-6392411320686-6hBVmX --no-default-browser-check --no-first-run --ignore-certificate-errors --test-type --disable-renderer-REDACTEDing --disable-REDACTED-timer-throttling REDACTED(dns block)/proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --ignore-certificate-errors --use-angle=swiftshader-webgl --mute-audio --ignore-certificate-errors --crashpad-handler-pid=5696 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/testem-6924272276592-s2Io6S --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,7409941703946872075,11366128499208713936,262144 --disable-features=PaintHolding --variations-seed-version(dns block)content-autofill.googleapis.com/proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --ignore-certificate-errors --use-angle=swiftshader-webgl --mute-audio --ignore-certificate-errors --crashpad-handler-pid=5860 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/testem-7065270613233-Zs8Gkg --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,8031331439931817784,9817379153750705194,262144 --disable-features=PaintHolding --variations-seed-version(dns block)/opt/google/chrome/chrome /usr/bin/google-chrome --no-sandbox --headless --disable-dev-shm-usage --disable-software-rasterizer --mute-audio --remote-debugging-port=0 --window-size=1440,900 --user-data-dir=/tmp/testem-7065270613233-Zs8Gkg --no-default-browser-check --no-first-run --ignore-certificate-errors --test-type --disable-renderer-REDACTEDing --disable-REDACTED-timer-throttling REDACTED(dns block)/proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --ignore-certificate-errors --use-angle=swiftshader-webgl --mute-audio --ignore-certificate-errors --crashpad-handler-pid=6022 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/testem-7177259096120-tL13t9 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,13198373564918574748,12643688462969006057,262144 --disable-features=PaintHolding --variations-seed-version(dns block)foo.bar/proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --ignore-certificate-errors --use-angle=swiftshader-webgl --mute-audio --ignore-certificate-errors --crashpad-handler-pid=5860 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/testem-7065270613233-Zs8Gkg --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,8031331439931817784,9817379153750705194,262144 --disable-features=PaintHolding --variations-seed-version(dns block)/opt/google/chrome/chrome /usr/bin/google-chrome --no-sandbox --headless --disable-dev-shm-usage --disable-software-rasterizer --mute-audio --remote-debugging-port=0 --window-size=1440,900 --user-data-dir=/tmp/testem-7065270613233-Zs8Gkg --no-default-browser-check --no-first-run --ignore-certificate-errors --test-type --disable-renderer-REDACTEDing --disable-REDACTED-timer-throttling REDACTED(dns block)/proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --ignore-certificate-errors --use-angle=swiftshader-webgl --mute-audio --ignore-certificate-errors --crashpad-handler-pid=6022 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/testem-7177259096120-tL13t9 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,13198373564918574748,12643688462969006057,262144 --disable-features=PaintHolding --variations-seed-version(dns block)optimizationguide-pa.googleapis.com/proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --ignore-certificate-errors --use-angle=swiftshader-webgl --mute-audio --ignore-certificate-errors --crashpad-handler-pid=4936 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/testem-6392411320686-6hBVmX --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,9827928193251718403,1265053761173172249,262144 --disable-features=PaintHolding --variations-seed-version(dns block)/opt/google/chrome/chrome /usr/bin/google-chrome --no-sandbox --headless --disable-dev-shm-usage --disable-software-rasterizer --mute-audio --remote-debugging-port=0 --window-size=1440,900 --user-data-dir=/tmp/testem-6392411320686-6hBVmX --no-default-browser-check --no-first-run --ignore-certificate-errors --test-type --disable-renderer-REDACTEDing --disable-REDACTED-timer-throttling REDACTED(dns block)/proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --ignore-certificate-errors --use-angle=swiftshader-webgl --mute-audio --ignore-certificate-errors --crashpad-handler-pid=5696 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/testem-6924272276592-s2Io6S --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,7409941703946872075,11366128499208713936,262144 --disable-features=PaintHolding --variations-seed-version(dns block)redirector.gvt1.com/proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --ignore-certificate-errors --use-angle=swiftshader-webgl --mute-audio --ignore-certificate-errors --crashpad-handler-pid=4936 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/testem-6392411320686-6hBVmX --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,9827928193251718403,1265053761173172249,262144 --disable-features=PaintHolding --variations-seed-version(dns block)/opt/google/chrome/chrome /usr/bin/google-chrome --no-sandbox --headless --disable-dev-shm-usage --disable-software-rasterizer --mute-audio --remote-debugging-port=0 --window-size=1440,900 --user-data-dir=/tmp/testem-6392411320686-6hBVmX --no-default-browser-check --no-first-run --ignore-certificate-errors --test-type --disable-renderer-REDACTEDing --disable-REDACTED-timer-throttling REDACTED(dns block)/proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --ignore-certificate-errors --use-angle=swiftshader-webgl --mute-audio --ignore-certificate-errors --crashpad-handler-pid=5696 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/testem-6924272276592-s2Io6S --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,7409941703946872075,11366128499208713936,262144 --disable-features=PaintHolding --variations-seed-version(dns block)safebrowsing.googleapis.com/proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --ignore-certificate-errors --use-angle=swiftshader-webgl --mute-audio --ignore-certificate-errors --crashpad-handler-pid=5696 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/testem-6924272276592-s2Io6S --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,7409941703946872075,11366128499208713936,262144 --disable-features=PaintHolding --variations-seed-version(dns block)/opt/google/chrome/chrome /usr/bin/google-chrome --no-sandbox --headless --disable-dev-shm-usage --disable-software-rasterizer --mute-audio --remote-debugging-port=0 --window-size=1440,900 --user-data-dir=/tmp/testem-6924272276592-s2Io6S --no-default-browser-check --no-first-run --ignore-certificate-errors --test-type --disable-renderer-REDACTEDing --disable-REDACTED-timer-throttling REDACTED(dns block)/proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --ignore-certificate-errors --use-angle=swiftshader-webgl --mute-audio --ignore-certificate-errors --crashpad-handler-pid=6022 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/testem-7177259096120-tL13t9 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,13198373564918574748,12643688462969006057,262144 --disable-features=PaintHolding --variations-seed-version(dns block)safebrowsingohttpgateway.googleapis.com/proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --ignore-certificate-errors --use-angle=swiftshader-webgl --mute-audio --ignore-certificate-errors --crashpad-handler-pid=4936 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/testem-6392411320686-6hBVmX --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,9827928193251718403,1265053761173172249,262144 --disable-features=PaintHolding --variations-seed-version(dns block)/opt/google/chrome/chrome /usr/bin/google-chrome --no-sandbox --headless --disable-dev-shm-usage --disable-software-rasterizer --mute-audio --remote-debugging-port=0 --window-size=1440,900 --user-data-dir=/tmp/testem-6392411320686-6hBVmX --no-default-browser-check --no-first-run --ignore-certificate-errors --test-type --disable-renderer-REDACTEDing --disable-REDACTED-timer-throttling REDACTED(dns block)/proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --ignore-certificate-errors --use-angle=swiftshader-webgl --mute-audio --ignore-certificate-errors --crashpad-handler-pid=5696 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/testem-6924272276592-s2Io6S --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,7409941703946872075,11366128499208713936,262144 --disable-features=PaintHolding --variations-seed-version(dns block)update.googleapis.com/proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --ignore-certificate-errors --use-angle=swiftshader-webgl --mute-audio --ignore-certificate-errors --crashpad-handler-pid=4936 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/testem-6392411320686-6hBVmX --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,9827928193251718403,1265053761173172249,262144 --disable-features=PaintHolding --variations-seed-version(dns block)/opt/google/chrome/chrome /usr/bin/google-chrome --no-sandbox --headless --disable-dev-shm-usage --disable-software-rasterizer --mute-audio --remote-debugging-port=0 --window-size=1440,900 --user-data-dir=/tmp/testem-6392411320686-6hBVmX --no-default-browser-check --no-first-run --ignore-certificate-errors --test-type --disable-renderer-REDACTEDing --disable-REDACTED-timer-throttling REDACTED(dns block)/proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --ignore-certificate-errors --use-angle=swiftshader-webgl --mute-audio --ignore-certificate-errors --crashpad-handler-pid=5696 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/testem-6924272276592-s2Io6S --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,7409941703946872075,11366128499208713936,262144 --disable-features=PaintHolding --variations-seed-version(dns block)www.google.com/proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --ignore-certificate-errors --use-angle=swiftshader-webgl --mute-audio --ignore-certificate-errors --crashpad-handler-pid=4936 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/testem-6392411320686-6hBVmX --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,9827928193251718403,1265053761173172249,262144 --disable-features=PaintHolding --variations-seed-version(dns block)/opt/google/chrome/chrome /usr/bin/google-chrome --no-sandbox --headless --disable-dev-shm-usage --disable-software-rasterizer --mute-audio --remote-debugging-port=0 --window-size=1440,900 --user-data-dir=/tmp/testem-6392411320686-6hBVmX --no-default-browser-check --no-first-run --ignore-certificate-errors --test-type --disable-renderer-REDACTEDing --disable-REDACTED-timer-throttling REDACTED(dns block)/proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --no-sandbox --disable-dev-shm-usage --ignore-certificate-errors --use-angle=swiftshader-webgl --mute-audio --ignore-certificate-errors --crashpad-handler-pid=5696 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/testem-6924272276592-s2Io6S --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,7409941703946872075,11366128499208713936,262144 --disable-features=PaintHolding --variations-seed-version(dns block)If you need me to access, download, or install something from one of these locations, you can either: