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: Created Nov. 3, 2016, 11: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
Index: include/AdblockPlus/JsValue.h
diff --git a/include/AdblockPlus/JsValue.h b/include/AdblockPlus/JsValue.h
index c9632149822fe9d5d44ef06efc2ef1caa0555613..8f3ea79c34b94428fd056a068a653ec770869448 100644
--- a/include/AdblockPlus/JsValue.h
+++ b/include/AdblockPlus/JsValue.h
@@ -132,13 +132,13 @@ 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> m_jsEngine;
Oleksandr 2016/11/25 10:38:04 Nit: I don't really see a value in renaming the va
sergei 2016/11/25 12:04:46 I thought we finally started to use #pragma once a
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;
+ std::unique_ptr<v8::Persistent<v8::Value>> m_value;
};
}
« no previous file with comments | « include/AdblockPlus/JsEngine.h ('k') | src/FileSystemJsObject.cpp » ('j') | src/JsContext.h » ('J')

Powered by Google App Engine
This is Rietveld