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

Unified Diff: src/GlobalJsObject.cpp

Issue 29409580: Issue 5013 - Make parameter const ref when applicable. (Closed) Base URL: https://hg.adblockplus.org/libadblockplus/
Patch Set: Created April 11, 2017, 1:58 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/GlobalJsObject.cpp
===================================================================
--- a/src/GlobalJsObject.cpp
+++ b/src/GlobalJsObject.cpp
@@ -63,18 +63,18 @@
}
std::string eventName = converted.front()->AsString();
converted.erase(converted.begin());
jsEngine->TriggerEvent(eventName, converted);
return v8::Undefined();
}
}
-JsValuePtr GlobalJsObject::Setup(JsEnginePtr jsEngine, const AppInfo& appInfo,
- JsValuePtr obj)
+JsValuePtr GlobalJsObject::Setup(const JsEnginePtr& jsEngine, const AppInfo& appInfo,
+ const JsValuePtr& obj)
{
obj->SetProperty("setTimeout", jsEngine->NewCallback(::SetTimeoutCallback));
obj->SetProperty("_triggerEvent", jsEngine->NewCallback(::TriggerEventCallback));
obj->SetProperty("_fileSystem",
FileSystemJsObject::Setup(jsEngine, jsEngine->NewObject()));
obj->SetProperty("_webRequest",
WebRequestJsObject::Setup(jsEngine, jsEngine->NewObject()));
obj->SetProperty("console",

Powered by Google App Engine
This is Rietveld