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

Unified Diff: include/AdblockPlus/JsEngine.h

Issue 29443577: xxx (Closed) Base URL: https://github.com/adblockplus/libadblockplus.git
Patch Set: Created May 20, 2017, 9:02 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 | « 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 ead2088943a4c68e305faa29f123edf7c42b9001..ee4b638ae80626c4797d54e78dd4d1488de507a7 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,19 +304,19 @@ namespace AdblockPlus
*/
v8::Isolate* GetIsolate()
{
- return isolate->Get();
+ return isolate.Get();
}
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