Opened on 08/24/2017 at 06:44:56 PM

Closed on 08/28/2017 at 07:38:12 AM

Last modified on 09/08/2017 at 09:23:54 AM

#5570 closed change (fixed)

Make V8 isolate injectable into JsEngine.

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



In order to simplify usage of libadblockplus with an arbitrary V8 we should allow to inject v8::Isolate.

There is need to use V8 which is already used by an application where libadblockplus is integrated to, e.g. in chromium. It can save a couple of MBs because the second V8 won't be linked statically, so the size of an image of a binary loaded into the memory will be less (it's expected the difference to be not bigger than 5 MB, though). In addition sharing of already existing v8::Isolate can probably save a little bit more memory (it's expected the difference to be not bigger than a couple of MBs), though it can be challenging to avoid bugs. It turned out that initialization of V8 and instantiation of v8::Isolate can be pretty complicated and depends on particular project, so we should delegate it to embedders of libadblockplus.

What to change

Create an interface AdblockPlus::IV8IsolateProvider which has method v8::Isolate* Get() and provide a way to pass it to JsEngine at the construction stage. If it's value is nullptr then use the default implementation which should be currently existing ScopedV8Isolate.

Attachments (0)

Change History (6)

comment:1 Changed on 08/25/2017 at 08:03:22 AM by sergz

  • Owner set to sergz

comment:2 Changed on 08/25/2017 at 08:34:29 AM by sergz

  • Review URL(s) modified (diff)

comment:3 Changed on 08/25/2017 at 08:34:41 AM by sergz

  • Status changed from new to reviewing

comment:4 Changed on 08/28/2017 at 07:37:53 AM by abpbot

A commit referencing this issue has landed:
Issue 5570 - Make V8 isolate injectable into JsEngine

comment:5 Changed on 08/28/2017 at 07:38:12 AM by sergz

  • Resolution set to fixed
  • Status changed from reviewing to closed

comment:6 Changed on 09/08/2017 at 09:23:54 AM by sergz

  • Blocking 5643 added

Add Comment

Modify Ticket

Change Properties
as closed .
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from sergz.
Note: See TracTickets for help on using tickets.