Index: src/JsContext.h |
diff --git a/src/JsContext.h b/src/JsContext.h |
index 3a3f2db7fde5028ac1efc09760f98dde7d3b7b26..dc4578005091a5d08b91ba9944f686fdddf5465f 100644 |
--- a/src/JsContext.h |
+++ b/src/JsContext.h |
@@ -26,9 +26,12 @@ namespace AdblockPlus |
class JsContext |
{ |
public: |
- explicit JsContext(const JsEnginePtr jsEngine); |
- |
+ explicit JsContext(const std::weak_ptr<JsEngine>& jsEngine); |
+ JsEngine& GetJsEngine() { |
+ return *jsEngine; |
+ } |
private: |
+ JsEnginePtr jsEngine; |
const v8::Locker locker; |
const v8::Isolate::Scope isolateScope; |
const v8::HandleScope handleScope; |