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

Unified Diff: test/JsEngine.cpp

Issue 29410664: Issue 5013 - Use const JsValue and pass reference where applicable (Closed) Base URL: https://hg.adblockplus.org/libadblockplus/
Patch Set: Fixed comment Created April 13, 2017, 3:45 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
« no previous file with comments | « test/FilterEngine.cpp ('k') | test/UpdateCheck.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/JsEngine.cpp
===================================================================
--- a/test/JsEngine.cpp
+++ b/test/JsEngine.cpp
@@ -62,19 +62,19 @@
value = jsEngine->NewObject();
ASSERT_TRUE(value->IsObject());
ASSERT_EQ(0u, value->GetOwnPropertyNames().size());
}
TEST_F(JsEngineTest, EventCallbacks)
{
bool callbackCalled = false;
- AdblockPlus::JsValueList callbackParams;
+ AdblockPlus::JsConstValueList callbackParams;
auto Callback = [&callbackCalled, & callbackParams](
- const AdblockPlus::JsValueList& params)
+ const AdblockPlus::JsConstValueList& params)
{
callbackCalled = true;
callbackParams = params;
};
// Trigger event without a callback
callbackCalled = false;
jsEngine->Evaluate("_triggerEvent('foobar')");
« no previous file with comments | « test/FilterEngine.cpp ('k') | test/UpdateCheck.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld