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

Unified Diff: include/AdblockPlus/JsEngine.h

Issue 29442722: Issue 3593 - stop sharing v8::Isolate among tests (Closed) Base URL: https://github.com/adblockplus/libadblockplus.git
Patch Set: address comments Created May 26, 2017, 10:54 a.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 | « no previous file | src/JsEngine.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/AdblockPlus/JsEngine.h
diff --git a/include/AdblockPlus/JsEngine.h b/include/AdblockPlus/JsEngine.h
index ca7b5f3e63e761f1329392c174419b20bc45978f..63f929c94a0b481b33ec3270d50a6ab51408540b 100644
--- a/include/AdblockPlus/JsEngine.h
+++ b/include/AdblockPlus/JsEngine.h
@@ -82,11 +82,6 @@ namespace AdblockPlus
};
/**
- * Shared smart pointer to ScopedV8Isolate instance;
- */
- typedef std::shared_ptr<ScopedV8Isolate> ScopedV8IsolatePtr;
-
- /**
* JavaScript engine used by `FilterEngine`, wraps v8.
*/
class JsEngine : public std::enable_shared_from_this<JsEngine>
@@ -132,8 +127,7 @@ namespace AdblockPlus
*/
static JsEnginePtr New(const AppInfo& appInfo = AppInfo(),
TimerPtr timer = CreateDefaultTimer(),
- WebRequestPtr webRequest = CreateDefaultWebRequest(),
- const ScopedV8IsolatePtr& isolate = ScopedV8IsolatePtr(new ScopedV8Isolate()));
+ WebRequestPtr webRequest = CreateDefaultWebRequest());
/**
* Registers the callback function for an event.
@@ -310,7 +304,7 @@ namespace AdblockPlus
*/
v8::Isolate* GetIsolate()
{
- return isolate->Get();
+ return isolate.Get();
}
/**
@@ -321,13 +315,13 @@ namespace AdblockPlus
private:
void CallTimerTask(const JsWeakValuesID& timerParamsID);
- explicit JsEngine(const ScopedV8IsolatePtr& isolate, TimerPtr timer, WebRequestPtr webRequest);
+ explicit JsEngine(TimerPtr timer, WebRequestPtr webRequest);
JsValue GetGlobalObject();
/// Isolate must be disposed only after disposing of all objects which are
/// using it.
- ScopedV8IsolatePtr isolate;
+ ScopedV8Isolate isolate;
FileSystemPtr fileSystem;
LogSystemPtr logSystem;
« no previous file with comments | « no previous file | src/JsEngine.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld