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

Unified Diff: include/AdblockPlus/JsValue.h

Issue 6584950149087232: Issue 1280 - Update v8 (Closed)
Patch Set: get rid of auto and fix friends of JsValue Created Oct. 31, 2014, 4:10 p.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
===================================================================
--- a/include/AdblockPlus/JsValue.h
+++ b/include/AdblockPlus/JsValue.h
@@ -28,6 +28,7 @@
{
class Value;
template<class T> class Handle;
+ template<class T> class Local;
}
namespace AdblockPlus
@@ -54,8 +55,9 @@
class JsValue
{
friend class JsEngine;
+ protected:
+ JsValue(const JsValuePtr& value);
Felix Dahlke 2014/10/31 16:30:15 There's already a protected block below, why not m
sergei 2014/10/31 17:14:17 Sure, I can move. Do we have something in some sty
Felix Dahlke 2014/11/01 04:45:40 No, wasn't necessary to have that in the style so
sergei 2014/11/03 12:58:19 Merged
public:
- JsValue(JsValuePtr value);
virtual ~JsValue();
bool IsUndefined() const;
@@ -94,7 +96,7 @@
void SetProperty(const std::string& name, const std::string& val);
void SetProperty(const std::string& name, int64_t val);
void SetProperty(const std::string& name, bool val);
- void SetProperty(const std::string& name, JsValuePtr value);
+ void SetProperty(const std::string& name, const JsValuePtr& value);
inline void SetProperty(const std::string& name, const char* val)
{
SetProperty(name, std::string(val));
@@ -123,11 +125,13 @@
JsValuePtr Call(const JsValueList& params = JsValueList(),
AdblockPlus::JsValuePtr thisPtr = AdblockPlus::JsValuePtr()) const;
+ v8::Local<v8::Value> UnwrapValue() const;
+ private:
Felix Dahlke 2014/10/31 16:30:15 Same here, why add another private block when ther
+ JsValue(const JsEnginePtr& jsEngine, v8::Handle<v8::Value> value);
+ void SetProperty(const std::string& name, v8::Handle<v8::Value> val);
protected:
- JsValue(JsEnginePtr jsEngine, v8::Handle<v8::Value> value);
- void SetProperty(const std::string& name, v8::Handle<v8::Value> val);
-
JsEnginePtr jsEngine;
+ private:
V8ValueHolder<v8::Value> value;
};
}

Powered by Google App Engine
This is Rietveld