Index: include/AdblockPlus/JsValue.h |
diff --git a/include/AdblockPlus/JsValue.h b/include/AdblockPlus/JsValue.h |
index c9632149822fe9d5d44ef06efc2ef1caa0555613..3d2bfa97b3633125896fce8fc7c2c0b609b05437 100644 |
--- a/include/AdblockPlus/JsValue.h |
+++ b/include/AdblockPlus/JsValue.h |
@@ -132,11 +132,11 @@ namespace AdblockPlus |
*/ |
JsValuePtr Call(const JsValue& arg) const; |
- v8::Local<v8::Value> UnwrapValue() const; |
+ v8::Local<v8::Value> UnwrapValue(JsEngine& jsEngine) const; |
protected: |
- JsEnginePtr jsEngine; |
+ std::weak_ptr<JsEngine> jsEngine; |
private: |
- JsValue(JsEnginePtr jsEngine, v8::Handle<v8::Value> value); |
+ JsValue(const std::weak_ptr<JsEngine>& jsEngine, v8::Handle<v8::Value> value); |
void SetProperty(const std::string& name, v8::Handle<v8::Value> val); |
std::unique_ptr<v8::Persistent<v8::Value>> value; |
}; |