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

Issue 29409580: Issue 5013 - Make parameter const ref when applicable. (Closed)

Created:
April 11, 2017, 1:58 p.m. by hub
Modified:
April 19, 2017, 11:39 a.m.
Reviewers:
sergei
Base URL:
https://hg.adblockplus.org/libadblockplus/
Visibility:
Public.

Description

Issue 5013 - Make parameter const ref when applicable.

Patch Set 1 #

Total comments: 6

Patch Set 2 : Pass ref or const ref instead of shared_ptr<> #

Patch Set 3 : Remove an unecessary smart pointer. #

Patch Set 4 : Rebased #

Total comments: 11

Patch Set 5 : the input stream is no longer const. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+98 lines, -99 lines) Patch
M include/AdblockPlus/DefaultFileSystem.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M include/AdblockPlus/FileSystem.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M include/AdblockPlus/FilterEngine.h View 1 4 chunks +7 lines, -7 lines 0 comments Download
M include/AdblockPlus/JsEngine.h View 5 chunks +9 lines, -9 lines 0 comments Download
M include/AdblockPlus/JsValue.h View 1 chunk +1 line, -1 line 0 comments Download
M src/AppInfoJsObject.h View 1 1 chunk +2 lines, -2 lines 0 comments Download
M src/AppInfoJsObject.cpp View 1 1 chunk +1 line, -2 lines 0 comments Download
M src/ConsoleJsObject.h View 1 1 chunk +1 line, -1 line 0 comments Download
M src/ConsoleJsObject.cpp View 1 1 chunk +7 lines, -7 lines 0 comments Download
M src/DefaultFileSystem.cpp View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M src/FileSystemJsObject.h View 1 1 chunk +1 line, -1 line 0 comments Download
M src/FileSystemJsObject.cpp View 1 2 2 chunks +9 lines, -9 lines 0 comments Download
M src/FilterEngine.cpp View 1 4 chunks +8 lines, -8 lines 0 comments Download
M src/GlobalJsObject.h View 1 1 chunk +1 line, -1 line 0 comments Download
M src/GlobalJsObject.cpp View 1 1 chunk +8 lines, -8 lines 0 comments Download
M src/JsContext.h View 1 chunk +1 line, -1 line 0 comments Download
M src/JsContext.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/JsEngine.cpp View 1 6 chunks +9 lines, -9 lines 0 comments Download
M src/JsError.h View 2 chunks +4 lines, -4 lines 0 comments Download
M src/JsError.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M src/JsValue.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/Thread.h View 1 chunk +1 line, -1 line 0 comments Download
M src/Thread.cpp View 1 chunk +1 line, -1 line 0 comments Download
M src/Utils.h View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M src/Utils.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M src/WebRequestJsObject.h View 1 1 chunk +1 line, -1 line 0 comments Download
M src/WebRequestJsObject.cpp View 1 2 chunks +3 lines, -3 lines 0 comments Download
M test/BaseJsTest.h View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M test/DefaultFileSystem.cpp View 1 1 chunk +2 lines, -2 lines 0 comments Download
M test/FileSystemJsObject.cpp View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M test/FilterEngine.cpp View 1 2 chunks +2 lines, -2 lines 0 comments Download
M test/Prefs.cpp View 1 2 3 4 2 chunks +3 lines, -3 lines 0 comments Download
M test/UpdateCheck.cpp View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 13
hub
April 11, 2017, 1:59 p.m. (2017-04-11 13:59:05 UTC) #1
hub
Updated patch following our discussion
April 11, 2017, 3:46 p.m. (2017-04-11 15:46:59 UTC) #2
sergei
https://codereview.adblockplus.org/29409580/diff/29409581/include/AdblockPlus/JsEngine.h File include/AdblockPlus/JsEngine.h (right): https://codereview.adblockplus.org/29409580/diff/29409581/include/AdblockPlus/JsEngine.h#newcode297 include/AdblockPlus/JsEngine.h:297: void CallTimerTask(const TimerTasks::const_iterator& timerTaskIterator); I'm not sure that passing ...
April 12, 2017, 1:34 p.m. (2017-04-12 13:34:31 UTC) #3
hub
https://codereview.adblockplus.org/29409580/diff/29410555/include/AdblockPlus/DefaultFileSystem.h File include/AdblockPlus/DefaultFileSystem.h (right): https://codereview.adblockplus.org/29409580/diff/29410555/include/AdblockPlus/DefaultFileSystem.h#newcode41 include/AdblockPlus/DefaultFileSystem.h:41: void Write(const std::string& path, const std::istream& data); On 2017/04/12 ...
April 12, 2017, 1:51 p.m. (2017-04-12 13:51:35 UTC) #4
sergei
https://codereview.adblockplus.org/29409580/diff/29410555/include/AdblockPlus/DefaultFileSystem.h File include/AdblockPlus/DefaultFileSystem.h (right): https://codereview.adblockplus.org/29409580/diff/29410555/include/AdblockPlus/DefaultFileSystem.h#newcode41 include/AdblockPlus/DefaultFileSystem.h:41: void Write(const std::string& path, const std::istream& data); On 2017/04/12 ...
April 12, 2017, 1:57 p.m. (2017-04-12 13:57:25 UTC) #5
hub
https://codereview.adblockplus.org/29409580/diff/29410555/src/AppInfoJsObject.cpp File src/AppInfoJsObject.cpp (right): https://codereview.adblockplus.org/29409580/diff/29410555/src/AppInfoJsObject.cpp#newcode26 src/AppInfoJsObject.cpp:26: JsValuePtr AppInfoJsObject::Setup(const AppInfo& appInfo, const JsValuePtr& obj) On 2017/04/12 ...
April 12, 2017, 2:04 p.m. (2017-04-12 14:04:53 UTC) #6
hub
https://codereview.adblockplus.org/29409580/diff/29410555/include/AdblockPlus/DefaultFileSystem.h File include/AdblockPlus/DefaultFileSystem.h (right): https://codereview.adblockplus.org/29409580/diff/29410555/include/AdblockPlus/DefaultFileSystem.h#newcode40 include/AdblockPlus/DefaultFileSystem.h:40: std::shared_ptr<std::istream> Read(const std::string& path) const; Also I have another ...
April 12, 2017, 2:42 p.m. (2017-04-12 14:42:27 UTC) #7
hub
https://codereview.adblockplus.org/29409580/diff/29409581/include/AdblockPlus/JsEngine.h File include/AdblockPlus/JsEngine.h (right): https://codereview.adblockplus.org/29409580/diff/29409581/include/AdblockPlus/JsEngine.h#newcode297 include/AdblockPlus/JsEngine.h:297: void CallTimerTask(const TimerTasks::const_iterator& timerTaskIterator); On 2017/04/12 13:34:30, sergei wrote: ...
April 12, 2017, 3:06 p.m. (2017-04-12 15:06:14 UTC) #8
hub
updated the patch
April 12, 2017, 3:17 p.m. (2017-04-12 15:17:03 UTC) #9
hub
https://codereview.adblockplus.org/29409580/diff/29410555/src/AppInfoJsObject.cpp File src/AppInfoJsObject.cpp (right): https://codereview.adblockplus.org/29409580/diff/29410555/src/AppInfoJsObject.cpp#newcode26 src/AppInfoJsObject.cpp:26: JsValuePtr AppInfoJsObject::Setup(const AppInfo& appInfo, const JsValuePtr& obj) > > ...
April 13, 2017, 8:13 a.m. (2017-04-13 08:13:45 UTC) #10
sergei
I have concerns only regarding references to v8::Handle. The rest is fine. https://codereview.adblockplus.org/29409580/diff/29409581/src/Utils.cpp File src/Utils.cpp ...
April 18, 2017, 2:02 p.m. (2017-04-18 14:02:15 UTC) #11
hub
https://codereview.adblockplus.org/29409580/diff/29409581/src/Utils.cpp File src/Utils.cpp (right): https://codereview.adblockplus.org/29409580/diff/29409581/src/Utils.cpp#newcode37 src/Utils.cpp:37: std::string Utils::FromV8String(const v8::Handle<v8::Value>& value) On 2017/04/18 14:02:14, sergei wrote: ...
April 18, 2017, 4:18 p.m. (2017-04-18 16:18:51 UTC) #12
sergei
April 19, 2017, 10:18 a.m. (2017-04-19 10:18:47 UTC) #13
LGTM

Powered by Google App Engine
This is Rietveld