Skip to content

fix(http): _onDispose at sentinel disposal targets stale _currentEl in async response handler #324

Description

@ErickXavier

Found during review of PR #323 (pre-existing, not introduced there). The _onDispose() call at src/directives/http.js:~633 (sentinel disposal registration) runs inside the async response handler, where the module-level _currentEl used by _onDispose (globals.js:~278) may already point at a different element — registering the cleanup on the wrong element's disposer list. PR #323 worked around the same hazard for its MutationObserver by pushing directly to el.__disposers (with justification comment); the sentinel registration should get the same treatment. Audit http.js for any other _onDispose calls inside async continuations while at it.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions