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

Unified Diff: include/AdblockPlus/JsValue.h

Issue 5598762307158016: Issue 1550 - Get rid of V8ValueHolder.h (Closed)
Patch Set: rebase, no changes Created Jan. 22, 2016, 9: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 | « include/AdblockPlus/JsEngine.h ('k') | include/AdblockPlus/Notification.h » ('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 02ad87713d8686df82d8d2486030bd0b52a50fd4..9e84950cbabc715ccfbd7b555e4baa8f27c693f0 100644
--- a/include/AdblockPlus/JsValue.h
+++ b/include/AdblockPlus/JsValue.h
@@ -22,13 +22,13 @@
#include <string>
#include <vector>
#include <memory>
-#include "V8ValueHolder.h"
namespace v8
{
class Value;
template<class T> class Handle;
template<class T> class Local;
+ template<class T> class Persistent;
}
namespace AdblockPlus
@@ -56,6 +56,7 @@ namespace AdblockPlus
{
friend class JsEngine;
public:
+ JsValue(JsValue&& src);
virtual ~JsValue();
bool IsUndefined() const;
@@ -125,12 +126,11 @@ namespace AdblockPlus
v8::Local<v8::Value> UnwrapValue() const;
protected:
- JsValue(JsValuePtr value);
JsEnginePtr jsEngine;
private:
JsValue(JsEnginePtr jsEngine, v8::Handle<v8::Value> value);
void SetProperty(const std::string& name, v8::Handle<v8::Value> val);
- V8ValueHolder<v8::Value> value;
+ std::unique_ptr<v8::Persistent<v8::Value>> value;
Oleksandr 2016/01/22 12:11:14 Aren't we leaking the value here? The idea behind
};
}
« no previous file with comments | « include/AdblockPlus/JsEngine.h ('k') | include/AdblockPlus/Notification.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld