| Index: include/AdblockPlus/JsValue.h |
| =================================================================== |
| --- a/include/AdblockPlus/JsValue.h |
| +++ b/include/AdblockPlus/JsValue.h |
| @@ -37,21 +37,23 @@ namespace AdblockPlus |
| class JsEngine; |
| typedef std::shared_ptr<JsEngine> JsEnginePtr; |
| /** |
| * Shared smart pointer to a `JsValue` instance. |
| */ |
| typedef std::shared_ptr<JsValue> JsValuePtr; |
| + typedef std::shared_ptr<const JsValue> JsConstValuePtr; |
|
sergei
2017/03/23 19:46:06
What about ConstJsValuePtr?
|
| /** |
| * List of JavaScript values. |
| */ |
| typedef std::vector<AdblockPlus::JsValuePtr> JsValueList; |
| + typedef std::vector<AdblockPlus::JsConstValuePtr> JsConstValueList; |
|
sergei
2017/03/23 19:46:06
What about ConstJsValueList?
hub
2017/03/24 13:45:15
To answer about here and above, I feel like ConstJ
sergei
2017/03/24 13:56:47
Agree. Considering Js as a namespace makes sense h
|
| /** |
| * Wrapper for JavaScript values. |
| * See `JsEngine` for creating `JsValue` objects. |
| */ |
| class JsValue |
| { |
| friend class JsEngine; |
| @@ -116,17 +118,17 @@ namespace AdblockPlus |
| std::string GetClass() const; |
| /** |
| * Invokes the value as a function (see `IsFunction()`). |
| * @param params Optional list of parameters. |
| * @param thisPtr Optional `this` value. |
| * @return Value returned by the function. |
| */ |
| - JsValuePtr Call(const JsValueList& params = JsValueList(), |
| + JsValuePtr Call(const JsConstValueList& params = JsConstValueList(), |
|
sergei
2017/03/23 19:46:06
This change is a bit questionable, but I think we
hub
2017/03/24 13:45:15
it is quite essential. The problem boils down to t
sergei
2017/03/24 13:56:47
I rather thought about no replacing the existing m
|
| AdblockPlus::JsValuePtr thisPtr = AdblockPlus::JsValuePtr()) const; |
| /** |
| * Invokes the value as a function (see `IsFunction()`) with single |
| * parameter. |
| * @param arg A single required parameter. |
| * @return Value returned by the function. |
| */ |