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

Unified Diff: src/JsEngine.cpp

Issue 29442722: Issue 3593 - stop sharing v8::Isolate among tests (Closed) Base URL: https://github.com/adblockplus/libadblockplus.git
Patch Set: address comments and rebase Created May 24, 2017, 4:20 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
Index: src/JsEngine.cpp
diff --git a/src/JsEngine.cpp b/src/JsEngine.cpp
index 6d7446f4192291c523b444c3e3047cfd41d81bb4..0816304a75f1e3ff8e0b3f3f09fa7ef98ceaa74d 100644
--- a/src/JsEngine.cpp
+++ b/src/JsEngine.cpp
@@ -131,10 +131,8 @@ void JsEngine::CallTimerTask(const JsWeakValuesID& timerParamsID)
callback.Call(timerParams);
}
-AdblockPlus::JsEngine::JsEngine(const ScopedV8IsolatePtr& isolate,
- TimerPtr timer, WebRequestPtr webRequest)
- : isolate(isolate)
- , fileSystem(new DefaultFileSystem())
+AdblockPlus::JsEngine::JsEngine(TimerPtr timer, WebRequestPtr webRequest)
+ : fileSystem(new DefaultFileSystem())
, logSystem(new DefaultLogSystem())
, timer(std::move(timer))
, webRequest(std::move(webRequest))
@@ -142,10 +140,9 @@ AdblockPlus::JsEngine::JsEngine(const ScopedV8IsolatePtr& isolate,
}
AdblockPlus::JsEnginePtr AdblockPlus::JsEngine::New(const AppInfo& appInfo,
- TimerPtr timer, WebRequestPtr webRequest,
- const ScopedV8IsolatePtr& isolate)
+ TimerPtr timer, WebRequestPtr webRequest)
{
- JsEnginePtr result(new JsEngine(isolate, std::move(timer), std::move(webRequest)));
+ JsEnginePtr result(new JsEngine(std::move(timer), std::move(webRequest)));
const v8::Locker locker(result->GetIsolate());
const v8::Isolate::Scope isolateScope(result->GetIsolate());
« no previous file with comments | « include/AdblockPlus/JsEngine.h ('k') | test/BaseJsTest.cpp » ('j') | test/JsEngine.cpp » ('J')

Powered by Google App Engine
This is Rietveld