Get rid of detached threads
|Cc:||fhd, rjeschke, oleksandr, eric@…, asmirnov, hfiguiere||Blocked By:||#4688, #4692, #5182|
|Blocking:||#3593||Platform:||Unknown / Cross platform|
Description (last modified by sergz)
adblockplus uses timers (setTimeout) (with very long firing intervals). Current implementation in libadblockplus uses free running timer threads, each thread is represented as an instance of a TimeoutThread class which holds JsValuePtr function; and JsValueList functionArguments; which hold JsEnginePtr jsEngine; that holds isolate.
It results in some race conditions in tests as well as in some memory leakages (see #3593).
What to change
Stop keeping strong references to JsEngine and stop all timers when JsEngine is being destroyed.
Change History (16)
comment:6 Changed 4 months ago by eric@…
- Review URL(s) modified (diff)
- Status changed from new to reviewing