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: Created May 19, 2017, 5:27 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 d9b77228053edd5c27d6f753cd0aa534c71e984a..8fe35928c51d30faa7798a644a2ee19b5381d151 100644
--- a/src/JsEngine.cpp
+++ b/src/JsEngine.cpp
@@ -125,10 +125,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))
@@ -136,10 +134,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