| Index: include/AdblockPlus/JsValue.h |
| =================================================================== |
| --- a/include/AdblockPlus/JsValue.h |
| +++ b/include/AdblockPlus/JsValue.h |
| @@ -131,16 +131,22 @@ |
| * 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; |
| v8::Local<v8::Value> UnwrapValue() const; |
| + |
| + /** |
| + * Creates a new `JsValue` wrapper for the same JavaScript value. |
| + * @return Value new `JsValue` |
| + */ |
| + JsValue Clone() const; |
| protected: |
| JsEnginePtr jsEngine; |
| private: |
| JsValue(JsEnginePtr jsEngine, v8::Handle<v8::Value> value); |
| void SetProperty(const std::string& name, v8::Handle<v8::Value> val); |
| // Parameter args is not const because a pointer to its internal arrays is |
| // passed to v8::Function::Call but the latter does not expect a const pointer. |
| JsValue Call(std::vector<v8::Handle<v8::Value>>& args, v8::Local<v8::Object> thisObj) const; |