Index: src/JsEngine.cpp |
diff --git a/src/JsEngine.cpp b/src/JsEngine.cpp |
index 8fa65e10b7f93f197cc76fca7b5ac790061ed26c..da2e40e3b2a8b88b69d9d543ccb4e6f1cb9c4348 100644 |
--- a/src/JsEngine.cpp |
+++ b/src/JsEngine.cpp |
@@ -161,10 +161,10 @@ AdblockPlus::JsEngine::JsEngine(TimerPtr timer, FileSystemPtr fileSystem, |
AdblockPlus::JsEnginePtr AdblockPlus::JsEngine::New(const AppInfo& appInfo, |
TimerPtr timer, FileSystemPtr fileSystem, WebRequestPtr webRequest, LogSystemPtr logSystem) |
{ |
- JsEnginePtr result(new JsEngine(std::move(timer), |
- std::move(fileSystem), |
- std::move(webRequest), |
- std::move(logSystem))); |
+ JsEnginePtr result(new JsEngine(timer ? std::move(timer) : CreateDefaultTimer(), |
+ fileSystem ? std::move(fileSystem) : CreateDefaultFileSystem(), |
+ webRequest ? std::move(webRequest) : CreateDefaultWebRequest(), |
+ logSystem ? std::move(logSystem) : CreateDefaultLogSystem())); |
const v8::Locker locker(result->GetIsolate()); |
const v8::Isolate::Scope isolateScope(result->GetIsolate()); |