Opened 5 years ago

Last modified 2 years ago

#3595 closed defect

Get rid of detached threads — at Version 6

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

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 (6)

comment:1 Changed 5 years ago by sergz

  • Blocking 3593 added

comment:2 Changed 4 years ago by sergz

  • Description modified (diff)

What do you think about using of libuv for async IO and timers? It should allow us to get rid of detached threads and avoid having of any internal resources longer than the scope of JsEngine among currently supported platforms.

comment:3 Changed 4 years ago by asmirnov

  • Cc Anton added

comment:4 Changed 4 years ago by sergz

  • Blocked By 4688 added

comment:5 Changed 4 years ago by sergz

  • Blocked By 4692 added

comment:6 Changed 4 years ago by eric@…

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing
Note: See TracTickets for help on using tickets.