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

Unified Diff: src/JsValue.cpp

Issue 10254076: API cleanup, get rid of JsObject and GetProperty() methods that don`t return JsValue (Closed)
Patch Set: Slightly better Filter/Subscription constructors Created April 26, 2013, 11:51 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 | « src/FilterEngine.cpp ('k') | test/FilterEngine.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/JsValue.cpp
===================================================================
--- a/src/JsValue.cpp
+++ b/src/JsValue.cpp
@@ -19,16 +19,22 @@ namespace
AdblockPlus::JsValue::JsValue(AdblockPlus::JsEnginePtr jsEngine,
v8::Handle<v8::Value> value)
: jsEngine(jsEngine),
value(v8::Persistent<v8::Value>::New(jsEngine->isolate, value))
{
}
+AdblockPlus::JsValue::JsValue(AdblockPlus::JsValuePtr value)
+ : jsEngine(value->jsEngine),
+ value(v8::Persistent<v8::Value>::New(jsEngine->isolate, value->value))
+{
+}
+
AdblockPlus::JsValue::~JsValue()
{
value.Dispose(jsEngine->isolate);
}
bool AdblockPlus::JsValue::IsUndefined() const
{
const JsEngine::Context context(jsEngine);
« no previous file with comments | « src/FilterEngine.cpp ('k') | test/FilterEngine.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld