Index: src/JsContext.h |
diff --git a/src/JsContext.h b/src/JsContext.h |
index 3a3f2db7fde5028ac1efc09760f98dde7d3b7b26..434b647e3b694c12ce781fd46e3f97906e912fbb 100644 |
--- a/src/JsContext.h |
+++ b/src/JsContext.h |
@@ -26,13 +26,16 @@ namespace AdblockPlus |
class JsContext |
{ |
public: |
- explicit JsContext(const JsEnginePtr jsEngine); |
- |
+ explicit JsContext(const std::weak_ptr<JsEngine>& jsEngine); |
+ JsEngine& jsEngine() { |
Oleksandr
2016/11/25 10:38:04
Nit: Methods usually start with a capital letter:
sergei
2016/11/25 12:04:46
Done.
|
+ return *m_jsEngine; |
+ } |
private: |
- const v8::Locker locker; |
- const v8::Isolate::Scope isolateScope; |
- const v8::HandleScope handleScope; |
- const v8::Context::Scope contextScope; |
+ JsEnginePtr m_jsEngine; |
+ const v8::Locker m_locker; |
+ const v8::Isolate::Scope m_isolateScope; |
+ const v8::HandleScope m_handleScope; |
+ const v8::Context::Scope m_contextScope; |
}; |
} |