Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: include/AdblockPlus/Platform.h

Issue 29661564: Template out V8 and prepare for other JS engine implementations
Patch Set: Created Jan. 10, 2018, 1:29 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/AdblockPlus/JsValue.h ('k') | shell/src/GcCommand.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/AdblockPlus/Platform.h
===================================================================
--- a/include/AdblockPlus/Platform.h
+++ b/include/AdblockPlus/Platform.h
@@ -31,7 +31,12 @@
namespace AdblockPlus
{
struct IV8IsolateProvider;
- class JsEngine;
+
+ template <class T> class JsEngineTemplate;
+#ifndef JSENGINEIMPL
+#define JSENGINEIMPL JsEngineTemplate<JsEngineNamespaceImpl>
+#endif // !JSENGINEIMPL
+ typedef JSENGINEIMPL JsEngine;
/**
* AdblockPlus platform is the main component providing access to other
@@ -87,7 +92,7 @@
* Retrieves the `JsEngine` instance. It calls SetUpJsEngine if JsEngine is
* not initialized yet.
*/
- JsEngine& GetJsEngine();
+ JsEngineTemplate<JsEngineNamespaceImpl>& GetJsEngine();
/**
* Ensures that FilterEngine is constructed. Only the first call is effective.
« no previous file with comments | « include/AdblockPlus/JsValue.h ('k') | shell/src/GcCommand.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld