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

Unified Diff: test/FilterEngine.cpp

Issue 29410664: Issue 5013 - Use const JsValue and pass reference where applicable (Closed) Base URL: https://hg.adblockplus.org/libadblockplus/
Patch Set: Created April 12, 2017, 3:24 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: test/FilterEngine.cpp
===================================================================
--- a/test/FilterEngine.cpp
+++ b/test/FilterEngine.cpp
@@ -229,17 +229,17 @@
exampleSubscriptionResponse.responseText = "[Adblock Plus 2.0]\n||example.com";
webRequest->responses.emplace(subscriptionUrlPrefix, exampleSubscriptionResponse);
createParams.preconfiguredPrefs["first_run_subscription_auto_select"] = jsEngine->NewValue(false);
isConnectionAllowed = true;
createParams.isConnectionAllowedCallback = [this](const std::string* allowedConnectionType)->bool{
capturedConnectionTypes.Add(allowedConnectionType);
return isConnectionAllowed;
};
- jsEngine->SetEventCallback("filterChange", [this](const JsValueList& params/*action, item*/)
+ jsEngine->SetEventCallback("filterChange", [this](const JsConstValueList& params/*action, item*/)
{
ASSERT_EQ(2u, params.size());
if (params[0]->AsString() == "subscription.downloadStatus")
{
{
std::lock_guard<std::mutex> lock(downloadStatusChanged.mutex);
downloadStatusChanged.url = params[1]->GetProperty("url")->AsString();
}
« src/FilterEngine.cpp ('K') | « src/WebRequestJsObject.cpp ('k') | test/JsEngine.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld