Skip to content

fix: Scope asset-list listener cleanup to its owner - #10181

Open
Daytonrad wants to merge 1 commit into
playcanvas:mainfrom
Daytonrad:fix/asset-list-destroy-scope
Open

Daytonrad wants to merge 1 commit into
playcanvas:mainfrom
Daytonrad:fix/asset-list-destroy-scope

Conversation

@Daytonrad

Copy link
Copy Markdown

Description

Destroying an AssetListLoader removes registry listeners belonging to other active lists: the callbacks are shared prototype methods and the off() calls omit their subscription scope. Other lists then stop receiving successful loads, errors, or a shared missing ID being registered.

Pass the owning list as the scope when removing its three registry subscriptions. No API additions or changes to the load algorithm.

Validation

  • Three regressions fail before the fix and pass afterward, covering real HTTP success and 404 responses plus late asset registration.
  • npm test: 5,040 passing, 65 pending.
  • Repository-wide lint and all seven build targets pass.
  • git diff --check passes.

Tests use the existing Node/JSDOM application harness and real registry events. No GPU rendering was exercised.

Checklist

  • I have read the contributing guidelines
  • My code follows the project's coding standards
  • This PR focuses on a single change

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant