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

Unified Diff: include/AdblockPlus/JsValue.h

Issue 29361562: Issue 3594 - remove circular references JsEngine-JsValue-JsEngine (Closed)
Patch Set: address comments Created Nov. 29, 2016, 10:45 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 | « include/AdblockPlus/JsEngine.h ('k') | src/FileSystemJsObject.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
};
« no previous file with comments | « include/AdblockPlus/JsEngine.h ('k') | src/FileSystemJsObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld