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(); |
} |
} |