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

Unified Diff: src/WebRequestJsObject.cpp

Issue 29451722: Issue 4907 - Update v8 to 5.7.278 in libadblockplus (Closed) Base URL: https://github.com/adblockplus/libadblockplus.git
Patch Set: fix support of ARCH=ia32 Created June 2, 2017, 7:19 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
« README.md ('K') | « src/Utils.cpp ('k') | v8.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/WebRequestJsObject.cpp
diff --git a/src/WebRequestJsObject.cpp b/src/WebRequestJsObject.cpp
index b5002ed009ad778e90b80cd1fb295d3cdf41fa90..d4288a637725aeb012c09d2857bfdb5304faab6c 100644
--- a/src/WebRequestJsObject.cpp
+++ b/src/WebRequestJsObject.cpp
@@ -25,7 +25,7 @@
using namespace AdblockPlus;
-void JsEngine::ScheduleWebRequest(const v8::Arguments& arguments)
+void JsEngine::ScheduleWebRequest(const v8::FunctionCallbackInfo<v8::Value>& arguments)
{
AdblockPlus::JsEnginePtr jsEngine = AdblockPlus::JsEngine::FromArguments(arguments);
AdblockPlus::JsValueList converted = jsEngine->ConvertArguments(arguments);
@@ -80,7 +80,6 @@ void JsEngine::ScheduleWebRequest(const v8::Arguments& arguments)
webRequestParams[2].Call(resultObject);
};
-
if (jsEngine->webRequestLegacy)
{
std::thread([jsEngine, url, headers, getCallback]
@@ -95,19 +94,15 @@ void JsEngine::ScheduleWebRequest(const v8::Arguments& arguments)
namespace
{
- v8::Handle<v8::Value> GETCallback(const v8::Arguments& arguments)
+ void GETCallback(const v8::FunctionCallbackInfo<v8::Value>& arguments)
{
try
{
AdblockPlus::JsEngine::ScheduleWebRequest(arguments);
} catch (const std::exception& e)
{
- using AdblockPlus::Utils::ToV8String;
- v8::Isolate* isolate = arguments.GetIsolate();
- return v8::ThrowException(ToV8String(isolate, e.what()));
+ return AdblockPlus::Utils::ThrowExceptionInJS(arguments.GetIsolate(), e.what());
}
-
- return v8::Undefined();
}
}
« README.md ('K') | « src/Utils.cpp ('k') | v8.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld