| Index: include/AdblockPlus/JsValue.h |
| =================================================================== |
| --- a/include/AdblockPlus/JsValue.h |
| +++ b/include/AdblockPlus/JsValue.h |
| @@ -35,21 +35,16 @@ |
| namespace AdblockPlus |
| { |
| class JsValue; |
| class JsEngine; |
| typedef std::shared_ptr<JsEngine> JsEnginePtr; |
| /** |
| - * Shared smart pointer to a `JsValue` instance. |
| - */ |
| - typedef std::shared_ptr<JsValue> JsValuePtr; |
|
sergei
2017/04/19 19:11:15
This is an achievement!
|
| - |
| - /** |
| * List of JavaScript values. |
| */ |
| typedef std::vector<AdblockPlus::JsValue> JsValueList; |
| /** |
| * Wrapper for JavaScript values. |
| * See `JsEngine` for creating `JsValue` objects. |
| */ |
| @@ -117,21 +112,27 @@ |
| * constructor. |
| * @return Class name of the value. |
| */ |
| 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. |
| */ |
| - JsValue Call(const JsValueList& params = JsValueList(), |
| - const AdblockPlus::JsValuePtr& thisPtr = AdblockPlus::JsValuePtr()) const; |
| + JsValue Call(const JsValueList& params = JsValueList()) const; |
| + |
| + /** |
| + * Invokes the value as a method (see `IsFunction()`). |
| + * @param params list of parameters. |
| + * @param thisPtr `this` value. |
| + * @return Value returned by the function. |
| + */ |
| + JsValue Call(const JsValueList& params, const AdblockPlus::JsValue& thisValue) const; |
| /** |
| * Invokes the value as a function (see `IsFunction()`) with single |
| * parameter. |
| * @param arg A single required parameter. |
| * @return Value returned by the function. |
| */ |
| JsValue Call(const JsValue& arg) const; |