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

Unified Diff: test/UpdateCheck.cpp

Issue 29499583: Issue 4938 - fix race conditions related to LazyFileSystem (Closed) Base URL: https://github.com/adblockplus/libadblockplus.git
Patch Set: Created July 27, 2017, 8:53 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
Index: test/UpdateCheck.cpp
diff --git a/test/UpdateCheck.cpp b/test/UpdateCheck.cpp
index 0fb2924715bc9a6e4cab320d833df3344c00c77d..b984daa4d5a4c229ae330eb0404af9c9235f9361 100644
--- a/test/UpdateCheck.cpp
+++ b/test/UpdateCheck.cpp
@@ -55,8 +55,9 @@ namespace
{
JsEngineCreationParameters jsEngineParams;
jsEngineParams.appInfo = appInfo;
+ LazyFileSystem* fileSystem;
jsEngineParams.logSystem.reset(new LazyLogSystem());
- jsEngineParams.fileSystem.reset(new LazyFileSystem());
+ jsEngineParams.fileSystem.reset(fileSystem = new LazyFileSystem());
jsEngineParams.timer = DelayedTimer::New(timerTasks);
jsEngineParams.webRequest = DelayedWebRequest::New(webRequestTasks);
auto jsEngine = CreateJsEngine(std::move(jsEngineParams));
@@ -66,7 +67,7 @@ namespace
eventCallbackParams = std::move(params);
});
- filterEngine = AdblockPlus::FilterEngine::Create(jsEngine);
+ filterEngine = ::CreateFilterEngine(*fileSystem, jsEngine);
}
// Returns a URL or the empty string if there is no such request.
« test/FilterEngine.cpp ('K') | « test/Prefs.cpp ('k') | test/WebRequest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld