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

Unified Diff: src/GlobalJsObject.cpp

Issue 29451722: Issue 4907 - Update v8 to 5.7.278 in libadblockplus (Closed) Base URL: https://github.com/adblockplus/libadblockplus.git
Patch Set: address comments Created May 31, 2017, 12:43 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/FileSystemJsObject.cpp ('k') | src/JsEngine.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/GlobalJsObject.cpp
diff --git a/src/GlobalJsObject.cpp b/src/GlobalJsObject.cpp
index 7109472c72b4aba524cf5f461d8f14c39ab44beb..e5080ef2e82bc0a93ef6a1892d12d9ed50b00569 100644
--- a/src/GlobalJsObject.cpp
+++ b/src/GlobalJsObject.cpp
@@ -33,7 +33,7 @@ using namespace AdblockPlus;
namespace
{
- v8::Handle<v8::Value> SetTimeoutCallback(const v8::Arguments& arguments)
+ void SetTimeoutCallback(const v8::FunctionCallbackInfo<v8::Value>& arguments)
{
try
{
@@ -42,29 +42,26 @@ namespace
catch (const std::exception& e)
{
v8::Isolate* isolate = arguments.GetIsolate();
- return v8::ThrowException(Utils::ToV8String(isolate, e.what()));
+ return Utils::ThrowExceptionInJS(isolate, e.what());
}
// We should actually return the timer ID here, which could be
// used via clearTimeout(). But since we don't seem to need
// clearTimeout(), we can save that for later.
- return v8::Undefined();
}
- v8::Handle<v8::Value> TriggerEventCallback(const v8::Arguments& arguments)
+ void TriggerEventCallback(const v8::FunctionCallbackInfo<v8::Value>& arguments)
{
AdblockPlus::JsEnginePtr jsEngine = AdblockPlus::JsEngine::FromArguments(arguments);
AdblockPlus::JsValueList converted = jsEngine->ConvertArguments(arguments);
if (converted.size() < 1)
{
v8::Isolate* isolate = arguments.GetIsolate();
- return v8::ThrowException(Utils::ToV8String(isolate,
- "_triggerEvent expects at least one parameter"));
+ return Utils::ThrowExceptionInJS(isolate, "_triggerEvent expects at least one parameter");
}
std::string eventName = converted.front().AsString();
converted.erase(converted.cbegin());
jsEngine->TriggerEvent(eventName, move(converted));
- return v8::Undefined();
}
}
« no previous file with comments | « src/FileSystemJsObject.cpp ('k') | src/JsEngine.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld