Open flytaly opened 9 months ago
Ok, I have found a way to handle this by using the throttleFilter (or debounceFilter) from vueuse.
useWebExtensionStorage(key, initial, { eventFilter: throttleFilter(200) })
Can confirm this bug is present occasionally and it does freeze Chrome entirely. What would be a good default setting to prevent these?
Describe the bug
The reactive storage introduced in #157 could lead to an infinite loop if properties of an object were changed in rapid succession inside asynchronous code. If this happens in a background script, it can make the browser unusable.
Example (full reproduction also included):
Reproduction
https://github.com/flytaly/vitesse-webext-infinite-loop/commit/3d93d8fd4f7c6f49615e8c433a07932cbd1bad70
System Info
Used Package Manager
pnpm
Validations