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(), ""); |