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

Unified Diff: src/JsEngine.cpp

Issue 29422625: Issue 5189 - use r-value references when objects should be transferred (Closed) Base URL: https://github.com/adblockplus/libadblockplus.git
Patch Set: Created April 26, 2017, 2:14 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 | « src/GlobalJsObject.cpp ('k') | test/FilterEngine.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 3aaaeb9cd0924cc90503c6e869309e56ef3d2bf9..71be92f3735f5036adba4dbb03a64378ad98430f 100644
--- a/src/JsEngine.cpp
+++ b/src/JsEngine.cpp
@@ -187,7 +187,7 @@ void AdblockPlus::JsEngine::RemoveEventCallback(const std::string& eventName)
eventCallbacks.erase(eventName);
}
-void AdblockPlus::JsEngine::TriggerEvent(const std::string& eventName, const AdblockPlus::JsValueList& params)
+void AdblockPlus::JsEngine::TriggerEvent(const std::string& eventName, AdblockPlus::JsValueList&& params)
{
EventCallback callback;
{
@@ -197,7 +197,7 @@ void AdblockPlus::JsEngine::TriggerEvent(const std::string& eventName, const Adb
return;
callback = it->second;
}
- callback(params);
+ callback(move(params));
}
void AdblockPlus::JsEngine::Gc()
« no previous file with comments | « src/GlobalJsObject.cpp ('k') | test/FilterEngine.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld