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

Unified Diff: src/ConsoleJsObject.cpp

Issue 29498576: Issue 4832 - remove API allowing changing of LogSystem after Initialization of JsEngine (Closed) Base URL: https://github.com/adblockplus/libadblockplus.git
Patch Set: address comment Created July 26, 2017, 4:48 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 | « include/AdblockPlus/LogSystem.h ('k') | src/JsEngine.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 4d7619eeedc120cf25037374df88dee1343fa6f1..9730f72838648bd9024883345b959faea4745555 100644
--- a/src/ConsoleJsObject.cpp
+++ b/src/ConsoleJsObject.cpp
@@ -45,8 +45,8 @@ namespace
source << AdblockPlus::Utils::FromV8String(frame->GetScriptName());
source << ":" << frame->GetLineNumber();
- AdblockPlus::LogSystemPtr callback = jsEngine->GetLogSystem();
- (*callback)(logLevel, message.str(), source.str());
+ AdblockPlus::LogSystem& callback = jsEngine->GetLogSystem();
+ callback(logLevel, message.str(), source.str());
}
void LogCallback(const v8::FunctionCallbackInfo<v8::Value>& arguments)
@@ -97,8 +97,8 @@ namespace
traceback << std::endl;
}
- AdblockPlus::LogSystemPtr callback = jsEngine->GetLogSystem();
- (*callback)(AdblockPlus::LogSystem::LOG_LEVEL_TRACE, traceback.str(), "");
+ AdblockPlus::LogSystem& callback = jsEngine->GetLogSystem();
+ callback(AdblockPlus::LogSystem::LOG_LEVEL_TRACE, traceback.str(), "");
}
}
« no previous file with comments | « include/AdblockPlus/LogSystem.h ('k') | src/JsEngine.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld