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

Unified Diff: include/AdblockPlus/JsEngine.h

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 | « include/AdblockPlus/FilterEngine.h ('k') | include/AdblockPlus/JsValue.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/AdblockPlus/JsEngine.h
===================================================================
--- a/include/AdblockPlus/JsEngine.h
+++ b/include/AdblockPlus/JsEngine.h
@@ -88,17 +88,17 @@
{
friend class JsValue;
friend class JsContext;
public:
/**
* Event callback function.
*/
- typedef std::function<void(const JsValueList& params)> EventCallback;
+ typedef std::function<void(const JsConstValueList& params)> EventCallback;
/**
* Callback function returning false when current connection is not allowed
* e.g. because it is a metered connection.
*/
typedef std::function<bool()> IsConnectionAllowedCallback;
/**
@@ -132,17 +132,17 @@
*/
void RemoveEventCallback(const std::string& eventName);
/**
* Triggers an event.
* @param eventName Event name.
* @param params Event parameters.
*/
- void TriggerEvent(const std::string& eventName, const JsValueList& params);
+ void TriggerEvent(const std::string& eventName, const JsConstValueList& params);
/**
* Evaluates a JavaScript expression.
* @param source JavaScript expression to evaluate.
* @param filename Optional file name for the expression, used in error
* messages.
* @return Result of the evaluated expression.
*/
@@ -210,19 +210,19 @@
* callback associated for global setTimeout method.
*/
static void ScheduleTimer(const v8::Arguments& arguments);
/**
* Converts v8 arguments to `JsValue` objects.
* @param arguments `v8::Arguments` object containing the arguments to
* convert.
- * @return List of arguments converted to `JsValue` objects.
+ * @return List of arguments converted to `const JsValue` objects.
*/
- JsValueList ConvertArguments(const v8::Arguments& arguments);
+ JsConstValueList ConvertArguments(const v8::Arguments& arguments);
/**
* @see `SetFileSystem()`.
*/
FileSystemPtr GetFileSystem() const;
/**
* Sets the `FileSystem` implementation used for all file I/O.
« no previous file with comments | « include/AdblockPlus/FilterEngine.h ('k') | include/AdblockPlus/JsValue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld