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

Unified Diff: src/JsValue.cpp

Issue 6193234183192576: Issue 1197 - change local copy of v8 (to 4.3.15) to work with Visual Studio 2013 (Closed)
Patch Set: rebase and update Created May 17, 2016, 3:18 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
« no previous file with comments | « src/JsEngine.cpp ('k') | src/Utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/JsValue.cpp
diff --git a/src/JsValue.cpp b/src/JsValue.cpp
index d2dda5a5df3981132a8b6956f228d12f0cd2916a..9d9d9e750f18dc98d104a227d316e97998b0ae08 100644
--- a/src/JsValue.cpp
+++ b/src/JsValue.cpp
@@ -25,7 +25,7 @@
AdblockPlus::JsValue::JsValue(AdblockPlus::JsEnginePtr jsEngine,
v8::Handle<v8::Value> value)
: jsEngine(jsEngine),
- value(new v8::Persistent<v8::Value>(jsEngine->GetIsolate(), value))
+ value(new v8::UniquePersistent<v8::Value>(jsEngine->GetIsolate(), value))
{
}
@@ -37,11 +37,6 @@ AdblockPlus::JsValue::JsValue(AdblockPlus::JsValue&& src)
AdblockPlus::JsValue::~JsValue()
{
- if (value)
- {
- value->Dispose();
- value.reset();
- }
}
bool AdblockPlus::JsValue::IsUndefined() const
@@ -192,7 +187,7 @@ void AdblockPlus::JsValue::SetProperty(const std::string& name, const JsValuePtr
void AdblockPlus::JsValue::SetProperty(const std::string& name, bool val)
{
const JsContext context(jsEngine);
- SetProperty(name, v8::Boolean::New(val));
+ SetProperty(name, v8::Boolean::New(jsEngine->GetIsolate(), val));
}
std::string AdblockPlus::JsValue::GetClass() const
« no previous file with comments | « src/JsEngine.cpp ('k') | src/Utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld