Ticket #226 (closed defect: fixed)
loadPlugins() _loadback() etc design flaw causing endless loops on plugin error.
| Reported by: | yermol | Owned by: | yermol |
|---|---|---|---|
| Priority: | normal | Milestone: | Version 1.0 |
| Component: | Xinha Core | Version: | trunk |
| Severity: | normal | Keywords: | |
| Cc: | yml@… |
Description
The design of all instances where a script uses the
- invoke background load, - set onload handler callback - return false
structure is flawed.
If, for instance, a plugin has a syntax error loadPlugins() will go into an endless loop atttempting to load and reload the plugin. This will slow down and eventually crash the browser.
A solution I have implemented in the unified_backend branch is to keep a counter of load attempts for each plugin and if the number of attempts exceeds a certain maximum (in my case 10) an error popup is generated.
I am implementing the same pattern in other areas where I find this problem. (linker plugin for instance).
