Opened on 11/07/2017 at 07:22:56 AM
Closed on 12/18/2017 at 06:02:02 AM
#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): |
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.
Attachments (0)
Change History (3)
comment:1 Changed on 11/07/2017 at 07:44:44 AM by asmirnov
- Review URL(s) modified (diff)
- Status changed from new to reviewing
comment:2 Changed on 11/07/2017 at 11:16:59 AM by abpbot
comment:3 Changed on 12/18/2017 at 06:02:02 AM by asmirnov
- Resolution set to fixed
- Status changed from reviewing to closed
A commit referencing this issue has landed:
Issue 6001 - Pass IV8IsolateProvider to Helper