Skip to content

Conversation

@dfenerski
Copy link
Contributor

Setup

  1. Assume for whatever reason execution reaches line 464
  2. Execution of _removeAssetFromDOMPool starts
  3. In the function body, there are 2 checks which assert:
    3.1. oDOMPool (a "static" DOM element) exists
    3.2. oAssetDOM (the thing we presumably no longer need and want to remove) exists
  4. If for whatever reason any of these do not exist, the _removeAssetFromDOMPool will silently do nothing (it will leave aSymbolsInDOM intact)
  5. Execution will return to line 461 to an unmodified array, freezing the application in an infinite loop.

Some semantics

In my case, oAssetDOM was being removed dynamically, by some other application code.

Leaving the question whether this element should be removed by some other application code aside, it seems to me the symbol removal should not be tied to the DOM element removal, unless I have missed some other dependency.

In any case, "get your app frozen if you remove the wrong DOM element" feels weird so I decided to check for second opinion by opening this PR.

@cla-assistant
Copy link

cla-assistant bot commented Jul 14, 2025

CLA assistant check
All committers have signed the CLA.

@NHristov-sap
Copy link
Contributor

Hello @dfenerski ,

Thank you for sharing your enhancement proposal. I've created an internal incident DINC0582971. The code owner will take a look on this PR.

Best Regards,
Nikolay Hristov
GitHub Dispatcher

@PetyaMarkovaBogdanova
Copy link
Contributor

Hi @dfenerski . The PR was successfully merged in UI5.

openui5bot pushed a commit that referenced this pull request Nov 14, 2025
Assume for whatever reason execution reaches line 464
Execution of _removeAssetFromDOMPool starts
In the function body, there are 2 checks which assert:
3.1. oDOMPool (a "static" DOM element) exists
3.2. oAssetDOM (the thing we presumably no longer need and want to remove) exists
If for whatever reason any of these do not exist, the _removeAssetFromDOMPool will silently do nothing (it will leave aSymbolsInDOM intact)
Execution will return to line 461 to an unmodified array, freezing the application in an infinite loop.
Some semantics
In my case, oAssetDOM was being removed dynamically, by some other application code.

Leaving the question whether this element should be removed by some other application code aside, it seems to me the symbol removal should not be tied to the DOM element removal, unless I have missed some other dependency.

In any case, "get your app frozen if you remove the wrong DOM element" feels weird so I decided to check for second opinion by opening this PR.

Closes #4309

Change-Id: Ia53516b33cfd078e33d53022e808925fe0ce8fbb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants