Opened 4 years ago

Last modified 21 months ago

#3595 closed defect

Get rid of detached threads — at Initial Version

Reported by: sergz Assignee:
Priority: P2 Milestone:
Module: Libadblockplus Keywords:
Cc: fhd, rjeschke, oleksandr, eric@…, asmirnov, hfiguiere Blocked By:
Blocking: Platform: Unknown / Cross platform
Ready: no Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

https://codereview.adblockplus.org/29367507/
https://codereview.adblockplus.org/29367522/
https://codereview.adblockplus.org/29395640/

Description

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's 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 (0)

Note: See TracTickets for help on using tickets.