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

Unified Diff: src/JsEngine.cpp

Issue 10524054: Rename ErrorCallback into LogSystem, provide a proper console API (Closed)
Patch Set: Created May 10, 2013, 2:01 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
Index: src/JsEngine.cpp
===================================================================
--- a/src/JsEngine.cpp
+++ b/src/JsEngine.cpp
@@ -183,28 +183,28 @@ AdblockPlus::WebRequestPtr AdblockPlus::
void AdblockPlus::JsEngine::SetWebRequest(AdblockPlus::WebRequestPtr val)
{
if (!val)
throw std::runtime_error("WebRequest cannot be null");
webRequest = val;
}
-AdblockPlus::ErrorCallbackPtr AdblockPlus::JsEngine::GetErrorCallback()
+AdblockPlus::LogSystemPtr AdblockPlus::JsEngine::GetLogSystem()
{
- if (!errorCallback)
- errorCallback.reset(new DefaultErrorCallback());
- return errorCallback;
+ if (!logSystem)
+ logSystem.reset(new DefaultLogSystem());
+ return logSystem;
}
-void AdblockPlus::JsEngine::SetErrorCallback(AdblockPlus::ErrorCallbackPtr val)
+void AdblockPlus::JsEngine::SetLogSystem(AdblockPlus::LogSystemPtr val)
{
if (!val)
- throw std::runtime_error("ErrorCallback cannot be null");
+ throw std::runtime_error("LogSystem cannot be null");
- errorCallback = val;
+ logSystem = val;
}
AdblockPlus::JsEngine::Context::Context(const JsEnginePtr jsEngine)
: locker(jsEngine->isolate), handleScope(),
contextScope(jsEngine->context)
{
}
« include/AdblockPlus/LogSystem.h ('K') | « src/ErrorCallback.cpp ('k') | test/BaseJsTest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld