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

Unified Diff: src/JsEngine.cpp

Issue 29499630: Issue 4938 - fix race conditions and get rid of hacks related to DefaultFileSystem (Closed) Base URL: https://github.com/adblockplus/libadblockplus.git
Patch Set: Created July 27, 2017, 11:15 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 | « src/DefaultFileSystem.cpp ('k') | test/DefaultFileSystem.cpp » ('j') | 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 558a03dd9d9d9bc11b7bd8b3ac6759e29ccbc264..8bbdca95425cfde6da0c2eea89d1df16038d3e6e 100644
--- a/src/JsEngine.cpp
+++ b/src/JsEngine.cpp
@@ -85,9 +85,9 @@ TimerPtr AdblockPlus::CreateDefaultTimer()
return TimerPtr(new DefaultTimer());
}
-FileSystemPtr AdblockPlus::CreateDefaultFileSystem()
+FileSystemPtr AdblockPlus::CreateDefaultFileSystem(const Scheduler& scheduler)
{
- return FileSystemPtr(new DefaultFileSystem(std::unique_ptr<DefaultFileSystemSync>(new DefaultFileSystemSync())));
+ return FileSystemPtr(new DefaultFileSystem(scheduler, std::unique_ptr<DefaultFileSystemSync>(new DefaultFileSystemSync())));
}
WebRequestPtr AdblockPlus::CreateDefaultWebRequest(const Scheduler& scheduler)
@@ -167,7 +167,7 @@ AdblockPlus::JsEnginePtr AdblockPlus::JsEngine::New(const AppInfo& appInfo,
TimerPtr timer, FileSystemPtr fileSystem, WebRequestPtr webRequest, LogSystemPtr logSystem)
{
JsEnginePtr result(new JsEngine(timer ? std::move(timer) : CreateDefaultTimer(),
- fileSystem ? std::move(fileSystem) : CreateDefaultFileSystem(),
+ fileSystem ? std::move(fileSystem) : CreateDefaultFileSystem(::DummyScheduler),
webRequest ? std::move(webRequest) : CreateDefaultWebRequest(::DummyScheduler),
logSystem ? std::move(logSystem) : CreateDefaultLogSystem()));
« no previous file with comments | « src/DefaultFileSystem.cpp ('k') | test/DefaultFileSystem.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld