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

Unified Diff: src/JsValue.cpp

Issue 29735555: Issue 6526 - replace deprecated v8::Handle by v8::Local (Closed) Base URL: https://github.com/adblockplus/libadblockplus@ef3f884a2efa47ace996398da09afe3d0ce647f0
Patch Set: Created March 28, 2018, 8:06 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/JsError.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 3934cc18634eaafdad756c9b61867b4a75bce6d3..c7c2aab62ccccc62fb618528e6307d5a2019eebc 100644
--- a/src/JsValue.cpp
+++ b/src/JsValue.cpp
@@ -25,7 +25,7 @@
using namespace AdblockPlus;
AdblockPlus::JsValue::JsValue(AdblockPlus::JsEnginePtr jsEngine,
- v8::Handle<v8::Value> value)
+ v8::Local<v8::Value> value)
: jsEngine(jsEngine),
value(new v8::Global<v8::Value>(jsEngine->GetIsolate(), value))
{
@@ -188,7 +188,7 @@ AdblockPlus::JsValue AdblockPlus::JsValue::GetProperty(const std::string& name)
return JsValue(jsEngine, obj->Get(property));
}
-void AdblockPlus::JsValue::SetProperty(const std::string& name, v8::Handle<v8::Value> val)
+void AdblockPlus::JsValue::SetProperty(const std::string& name, v8::Local<v8::Value> val)
{
if (!IsObject())
throw std::runtime_error("Attempting to set property on a non-object");
@@ -246,7 +246,7 @@ std::string AdblockPlus::JsValue::GetClass() const
JsValue JsValue::Call(const JsValueList& params) const
{
const JsContext context(*jsEngine);
- std::vector<v8::Handle<v8::Value>> argv;
+ std::vector<v8::Local<v8::Value>> argv;
for (const auto& param : params)
argv.push_back(param.UnwrapValue());
@@ -258,7 +258,7 @@ JsValue JsValue::Call(const JsValueList& params, const JsValue& thisValue) const
const JsContext context(*jsEngine);
v8::Local<v8::Object> thisObj = v8::Local<v8::Object>::Cast(thisValue.UnwrapValue());
- std::vector<v8::Handle<v8::Value>> argv;
+ std::vector<v8::Local<v8::Value>> argv;
for (const auto& param : params)
argv.push_back(param.UnwrapValue());
@@ -269,13 +269,13 @@ JsValue JsValue::Call(const JsValue& arg) const
{
const JsContext context(*jsEngine);
- std::vector<v8::Handle<v8::Value>> argv;
+ std::vector<v8::Local<v8::Value>> argv;
argv.push_back(arg.UnwrapValue());
return Call(argv, context.GetV8Context()->Global());
}
-JsValue JsValue::Call(std::vector<v8::Handle<v8::Value>>& args, v8::Local<v8::Object> thisObj) const
+JsValue JsValue::Call(std::vector<v8::Local<v8::Value>>& args, v8::Local<v8::Object> thisObj) const
{
if (!IsFunction())
throw std::runtime_error("Attempting to call a non-function");
« no previous file with comments | « src/JsError.cpp ('k') | src/Utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld