Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: src/JsContext.h

Issue 29361562: Issue 3594 - remove circular references JsEngine-JsValue-JsEngine (Closed)
Patch Set: temporary workaround for race condition Created Dec. 1, 2016, 10:26 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/FilterEngine.cpp ('k') | src/JsContext.cpp » ('j') | src/JsValue.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « src/FilterEngine.cpp ('k') | src/JsContext.cpp » ('j') | src/JsValue.cpp » ('J')

Powered by Google App Engine
This is Rietveld