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

Unified Diff: src/ConsoleJsObject.cpp

Issue 29409580: Issue 5013 - Make parameter const ref when applicable. (Closed) Base URL: https://hg.adblockplus.org/libadblockplus/
Patch Set: Rebased Created April 12, 2017, 8:49 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
Index: src/ConsoleJsObject.cpp
===================================================================
--- a/src/ConsoleJsObject.cpp
+++ b/src/ConsoleJsObject.cpp
@@ -100,18 +100,18 @@
AdblockPlus::LogSystemPtr callback = jsEngine->GetLogSystem();
(*callback)(AdblockPlus::LogSystem::LOG_LEVEL_TRACE, traceback.str(), "");
return v8::Undefined();
}
}
AdblockPlus::JsValuePtr AdblockPlus::ConsoleJsObject::Setup(
- AdblockPlus::JsEnginePtr jsEngine, AdblockPlus::JsValuePtr obj)
+ AdblockPlus::JsEngine& jsEngine, const AdblockPlus::JsValuePtr& obj)
{
- obj->SetProperty("log", jsEngine->NewCallback(::LogCallback));
- obj->SetProperty("debug", jsEngine->NewCallback(::DebugCallback));
- obj->SetProperty("info", jsEngine->NewCallback(::InfoCallback));
- obj->SetProperty("warn", jsEngine->NewCallback(::WarnCallback));
- obj->SetProperty("error", jsEngine->NewCallback(::ErrorCallback));
- obj->SetProperty("trace", jsEngine->NewCallback(::TraceCallback));
+ obj->SetProperty("log", jsEngine.NewCallback(::LogCallback));
+ obj->SetProperty("debug", jsEngine.NewCallback(::DebugCallback));
+ obj->SetProperty("info", jsEngine.NewCallback(::InfoCallback));
+ obj->SetProperty("warn", jsEngine.NewCallback(::WarnCallback));
+ obj->SetProperty("error", jsEngine.NewCallback(::ErrorCallback));
+ obj->SetProperty("trace", jsEngine.NewCallback(::TraceCallback));
return obj;
}

Powered by Google App Engine
This is Rietveld