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

Unified Diff: include/AdblockPlus/JsValue.h

Issue 6090724420354048: Noissue - Upgraded to latest libadblockplus version, included v8 includes (Closed)
Patch Set: Removed v8 includes Created Jan. 29, 2015, 5:09 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
diff --git a/include/AdblockPlus/JsValue.h b/include/AdblockPlus/JsValue.h
index ba17cc36f68274146b831947b5c8f6cda02f2726..44535f92711382aa905576c59a283a82e3e4c490 100644
--- a/include/AdblockPlus/JsValue.h
+++ b/include/AdblockPlus/JsValue.h
@@ -1,6 +1,6 @@
/*
- * This file is part of Adblock Plus <http://adblockplus.org/>,
- * Copyright (C) 2006-2014 Eyeo GmbH
+ * This file is part of Adblock Plus <https://adblockplus.org/>,
+ * Copyright (C) 2006-2015 Eyeo GmbH
*
* Adblock Plus is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3 as
@@ -28,6 +28,7 @@ namespace v8
{
class Value;
template<class T> class Handle;
+ template<class T> class Local;
}
namespace AdblockPlus
@@ -55,7 +56,6 @@ namespace AdblockPlus
{
friend class JsEngine;
public:
- JsValue(JsValuePtr value);
virtual ~JsValue();
bool IsUndefined() const;
@@ -94,7 +94,7 @@ namespace AdblockPlus
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 +123,13 @@ namespace AdblockPlus
JsValuePtr Call(const JsValueList& params = JsValueList(),
AdblockPlus::JsValuePtr thisPtr = AdblockPlus::JsValuePtr()) const;
+ 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);
-
- JsEnginePtr jsEngine;
V8ValueHolder<v8::Value> value;
};
}

Powered by Google App Engine
This is Rietveld