Opened 2 years ago

Closed 2 years ago

#6001 closed change (fixed)

Pass IV8IsolateProvider to Helper

Reported by: asmirnov Assignee:
Priority: P3 Milestone:
Module: Libadblockplus-Android Keywords:
Cc: sergz Blocked By:
Blocking: Platform: Android
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

https://codereview.adblockplus.org/29600561/

Description

Background

In order to make FilterEngine embeddable we've added useV8Isolate method with raw pointer as long argument (https://github.com/adblockplus/libadblockplus-android/blob/master/libadblockplus-android-settings/src/org/adblockplus/libadblockplus/android/settings/AdblockHelper.java#L135). However after discussion of libadblockplus library design it's clear that it's not suitable. Isolate instance is created and released in glue layer (in adblock_bridge.cc). Since libadblockplus threads are not released immediately after filterEngine.dispose() (https://github.com/adblockplus/libadblockplus-android/blob/master/libadblockplus-android-settings/src/org/adblockplus/libadblockplus/android/settings/AdblockHelper.java#L233) and still using isolate instance in threads we can't just release Isolate instance in glue layer. It forces us to pass the whole IV8IsolateProvider (https://github.com/adblockplus/libadblockplus/blob/b5a3901952c8ddd63113089e96d8d48ece23a04a/include/AdblockPlus/JsEngine.h#L59) that will be released by libadblockplus and then isolate instance to be released by provider.

What to change

Rename method to useV8Provider and treat it as IV8IsolateProvider implementation.

Change History (3)

comment:1 Changed 2 years ago by asmirnov

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:2 Changed 2 years ago by abpbot

A commit referencing this issue has landed:
Issue 6001 - Pass IV8IsolateProvider to Helper

comment:3 Changed 2 years ago by asmirnov

  • Resolution set to fixed
  • Status changed from reviewing to closed
Note: See TracTickets for help on using tickets.