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

Unified Diff: src/ConsoleJsObject.cpp

Issue 29451722: Issue 4907 - Update v8 to 5.7.278 in libadblockplus (Closed) Base URL: https://github.com/adblockplus/libadblockplus.git
Patch Set: independence from file mode of make_gyp_wrapper.py Created July 4, 2017, 11:11 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 | « shell/shell.gyp ('k') | src/FileSystemJsObject.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ConsoleJsObject.cpp
diff --git a/src/ConsoleJsObject.cpp b/src/ConsoleJsObject.cpp
index 81151cd8000c98d34f8363e8b0cf35465bddb858..4d7619eeedc120cf25037374df88dee1343fa6f1 100644
--- a/src/ConsoleJsObject.cpp
+++ b/src/ConsoleJsObject.cpp
@@ -25,8 +25,8 @@
namespace
{
- v8::Handle<v8::Value> DoLog(AdblockPlus::LogSystem::LogLevel logLevel,
- const v8::Arguments& arguments)
+ void DoLog(AdblockPlus::LogSystem::LogLevel logLevel,
+ const v8::FunctionCallbackInfo<v8::Value>& arguments)
{
AdblockPlus::JsEnginePtr jsEngine = AdblockPlus::JsEngine::FromArguments(arguments);
const AdblockPlus::JsContext context(*jsEngine);
@@ -41,48 +41,47 @@ namespace
}
std::stringstream source;
- v8::Local<v8::StackFrame> frame = v8::StackTrace::CurrentStackTrace(1)->GetFrame(0);
+ v8::Local<v8::StackFrame> frame = v8::StackTrace::CurrentStackTrace(arguments.GetIsolate(), 1)->GetFrame(0);
source << AdblockPlus::Utils::FromV8String(frame->GetScriptName());
source << ":" << frame->GetLineNumber();
AdblockPlus::LogSystemPtr callback = jsEngine->GetLogSystem();
(*callback)(logLevel, message.str(), source.str());
- return v8::Undefined();
}
- v8::Handle<v8::Value> LogCallback(const v8::Arguments& arguments)
+ void LogCallback(const v8::FunctionCallbackInfo<v8::Value>& arguments)
{
return DoLog(AdblockPlus::LogSystem::LOG_LEVEL_LOG, arguments);
}
- v8::Handle<v8::Value> DebugCallback(const v8::Arguments& arguments)
+ void DebugCallback(const v8::FunctionCallbackInfo<v8::Value>& arguments)
{
- return DoLog(AdblockPlus::LogSystem::LOG_LEVEL_LOG, arguments);
+ DoLog(AdblockPlus::LogSystem::LOG_LEVEL_LOG, arguments);
}
- v8::Handle<v8::Value> InfoCallback(const v8::Arguments& arguments)
+ void InfoCallback(const v8::FunctionCallbackInfo<v8::Value>& arguments)
{
- return DoLog(AdblockPlus::LogSystem::LOG_LEVEL_INFO, arguments);
+ DoLog(AdblockPlus::LogSystem::LOG_LEVEL_INFO, arguments);
}
- v8::Handle<v8::Value> WarnCallback(const v8::Arguments& arguments)
+ void WarnCallback(const v8::FunctionCallbackInfo<v8::Value>& arguments)
{
- return DoLog(AdblockPlus::LogSystem::LOG_LEVEL_WARN, arguments);
+ DoLog(AdblockPlus::LogSystem::LOG_LEVEL_WARN, arguments);
}
- v8::Handle<v8::Value> ErrorCallback(const v8::Arguments& arguments)
+ void ErrorCallback(const v8::FunctionCallbackInfo<v8::Value>& arguments)
{
- return DoLog(AdblockPlus::LogSystem::LOG_LEVEL_ERROR, arguments);
+ DoLog(AdblockPlus::LogSystem::LOG_LEVEL_ERROR, arguments);
}
- v8::Handle<v8::Value> TraceCallback(const v8::Arguments& arguments)
+ void TraceCallback(const v8::FunctionCallbackInfo<v8::Value>& arguments)
{
AdblockPlus::JsEnginePtr jsEngine = AdblockPlus::JsEngine::FromArguments(arguments);
const AdblockPlus::JsContext context(*jsEngine);
AdblockPlus::JsValueList converted = jsEngine->ConvertArguments(arguments);
std::stringstream traceback;
- v8::Local<v8::StackTrace> frames = v8::StackTrace::CurrentStackTrace(100);
+ v8::Local<v8::StackTrace> frames = v8::StackTrace::CurrentStackTrace(arguments.GetIsolate(), 100);
for (int i = 0, l = frames->GetFrameCount(); i < l; i++)
{
v8::Local<v8::StackFrame> frame = frames->GetFrame(i);
@@ -100,7 +99,6 @@ namespace
AdblockPlus::LogSystemPtr callback = jsEngine->GetLogSystem();
(*callback)(AdblockPlus::LogSystem::LOG_LEVEL_TRACE, traceback.str(), "");
- return v8::Undefined();
}
}
« no previous file with comments | « shell/shell.gyp ('k') | src/FileSystemJsObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld