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

Unified Diff: src/ConsoleJsObject.cpp

Issue 29810573: Issue 6526 - Remove deprecated Utf8Value() usage (Closed) Base URL: https://hg.adblockplus.org/libadblockplus/
Patch Set: Created June 19, 2018, 5:11 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 | « no previous file | src/FileSystemJsObject.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ConsoleJsObject.cpp
===================================================================
--- a/src/ConsoleJsObject.cpp
+++ b/src/ConsoleJsObject.cpp
@@ -38,17 +38,17 @@
{
if (i > 0)
message << " ";
message << converted[i].AsString();
}
std::stringstream source;
v8::Local<v8::StackFrame> frame = v8::StackTrace::CurrentStackTrace(arguments.GetIsolate(), 1)->GetFrame(0);
- source << AdblockPlus::Utils::FromV8String(frame->GetScriptName());
+ source << AdblockPlus::Utils::FromV8String(arguments.GetIsolate(), frame->GetScriptName());
source << ":" << frame->GetLineNumber();
jsEngine->GetPlatform().WithLogSystem(
[logLevel, &message, &source](AdblockPlus::LogSystem& callback)
{
callback(logLevel, message.str(), source.str());
});
}
@@ -85,23 +85,23 @@
AdblockPlus::JsValueList converted = jsEngine->ConvertArguments(arguments);
std::stringstream traceback;
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);
traceback << (i + 1) << ": ";
- std::string name = AdblockPlus::Utils::FromV8String(frame->GetFunctionName());
+ std::string name = AdblockPlus::Utils::FromV8String(arguments.GetIsolate(), frame->GetFunctionName());
if (name.size())
traceback << name;
else
traceback << "/* anonymous */";
traceback << "() at ";
- traceback << AdblockPlus::Utils::FromV8String(frame->GetScriptName());
+ traceback << AdblockPlus::Utils::FromV8String(arguments.GetIsolate(), frame->GetScriptName());
traceback << ":" << frame->GetLineNumber();
traceback << std::endl;
}
jsEngine->GetPlatform().WithLogSystem(
[&traceback](AdblockPlus::LogSystem& callback)
{
callback(AdblockPlus::LogSystem::LOG_LEVEL_TRACE, traceback.str(), "");
« no previous file with comments | « no previous file | src/FileSystemJsObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld