Opened 2 years ago
Last modified 2 months ago
#5450 new change
Modularize libadblockplus — at Version 5
Reported by: | sergz | Assignee: | |
---|---|---|---|
Priority: | P2 | Milestone: | |
Module: | Libadblockplus | Keywords: | |
Cc: | hfiguiere, fhd | Blocked By: | |
Blocking: | Platform: | Unknown / Cross platform | |
Ready: | no | Confidential: | no |
Tester: | Unknown | Verified working: | no |
Review URL(s): |
https://codereview.adblockplus.org/29500602/ |
Description (last modified by sergz)
Background
In order to
- do #1285, namely have separate Updater and FilterEngine classes
- do #5198, some external class, looking after asynchronous operations
- provide with fast access to settings, in android project there is a duplicated Prefs functionality because it takes too long to fully load ABP merely to show settings
- (part of #4693) give a hint that FilterEngine and JsEngine are destroyed in a wrong order and in general they should not be used outside the scope of the lifespan of that ABP-platform class
- avoid hacks with carrying ITimer in libadblockplus-android. ITimer is available during creation of JsEngine but it's needed in FilterEngine and one has to carry it via additional wrapper around native FilterEngine, however one could use that platform class and get access from it to all JsEngine, FilterEngine, Prefs and ITimer.
there is a need in some paltform class which is responsible for JsEngine, Updater, FilterEngine, Prefs, etc. and helps to deal with asynchronity.
What to change
Add the stub for that class and then gradually migrate internals in order to accomplish the issues mentioned above.
TODO:
- GetJsEngine should return a reference, not std::shared_ptr https://codereview.adblockplus.org/29500602/diff/29500603/include/AdblockPlus/JsEngine.h#newcode285
Change History (5)
comment:1 Changed 2 years ago by sergz
- Owner sergz deleted
comment:2 Changed 2 years ago by sergz
- Review URL(s) modified (diff)
comment:3 Changed 2 years ago by sergz
- Description modified (diff)
comment:4 Changed 2 years ago by sergz
- Description modified (diff)
comment:5 Changed 2 years ago by sergz
- Review URL(s) modified (diff)
Note: See
TracTickets for help on using
tickets.
I have a progress here but firstly it would be better to polish some parts of the existing code.