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: Remove the SetProperty() changes. Created April 13, 2017, 1:16 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();
}

Powered by Google App Engine
This is Rietveld