Commit eb69b0d
[FIX] sap.m.IllustrationPool: gracefully remove DOM pool assets
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: Ia53516b33cfd078e33d53022e808925fe0ce8fbb1 parent 239c451 commit eb69b0d
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
378 | 378 | | |
379 | 379 | | |
380 | 380 | | |
381 | | - | |
382 | 381 | | |
383 | 382 | | |
| 383 | + | |
| 384 | + | |
384 | 385 | | |
385 | 386 | | |
386 | 387 | | |
| |||
0 commit comments