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

Unified Diff: src/JsEngine.cpp

Issue 29499617: Noissue - set default values for platform interfaces to nullptr (Closed) Base URL: https://github.com/adblockplus/libadblockplus.git
Patch Set: Created July 27, 2017, 10:16 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 | « include/AdblockPlus/JsEngine.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
« no previous file with comments | « include/AdblockPlus/JsEngine.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld