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

Issue 29333350: Issue #3562 - Use 'ToWstring()' to convert BSTR values (Closed)

Created:
Jan. 11, 2016, 2:32 p.m. by Eric
Modified:
Jan. 22, 2016, 3:09 p.m.
Reviewers:
sergei, Oleksandr
CC:
Felix Dahlke
Visibility:
Public.

Description

Issue #3562 - Use 'ToWstring()' to convert BSTR values Use 'ToWstring()' to convert BSTR values from interfaces. This eliminates all occurrences of 'SysStringLen()' in the plugin code. (One remains, of course, in the implementation of 'ToWstring()'). A null BSTR pointer is the same as an empty string. Where needed, change the logic around BSTR [out] arguments so that these two are treated identically. This generally means converting first and testing 'empty()' afterwards.

Patch Set 1 #

Total comments: 2

Patch Set 2 : fix up error log message #

Unified diffs Side-by-side diffs Delta from patch set Stats (+45 lines, -42 lines) Patch
M src/plugin/AdblockPlusDomTraverser.cpp View 2 chunks +12 lines, -14 lines 0 comments Download
M src/plugin/PluginClass.cpp View 1 2 chunks +7 lines, -4 lines 0 comments Download
M src/plugin/PluginDomTraverserBase.h View 2 chunks +24 lines, -22 lines 0 comments Download
M src/plugin/PluginUserSettings.cpp View 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 8
Eric
This review also fixes some probably-inconsequential tiny defects dealing with empty strings.
Jan. 11, 2016, 2:36 p.m. (2016-01-11 14:36:38 UTC) #1
sergei
LGTM https://codereview.adblockplus.org/29333350/diff/29333351/src/plugin/PluginClass.cpp File src/plugin/PluginClass.cpp (right): https://codereview.adblockplus.org/29333350/diff/29333351/src/plugin/PluginClass.cpp#newcode180 src/plugin/PluginClass.cpp:180: DEBUG_ERROR_LOG(0, 0, 0, "CPluginClass::GetBrowserUrl - Reached with m_webBrowser2 ...
Jan. 11, 2016, 3:39 p.m. (2016-01-11 15:39:07 UTC) #2
Eric
Patch set 2 puts an error log message where it belongs. https://codereview.adblockplus.org/29333350/diff/29333351/src/plugin/PluginClass.cpp File src/plugin/PluginClass.cpp (right): ...
Jan. 11, 2016, 3:59 p.m. (2016-01-11 15:59:33 UTC) #3
Oleksandr
The changeset itself looks fine, however I think it involves too much subtle changes for ...
Jan. 22, 2016, 12:40 p.m. (2016-01-22 12:40:01 UTC) #4
Oleksandr
FYI I've created a ticket for this changeset: https://issues.adblockplus.org/ticket/3562
Jan. 22, 2016, 12:43 p.m. (2016-01-22 12:43:44 UTC) #5
Eric
No code changes. Changed issue description to reflect the change set message as it will ...
Jan. 22, 2016, 1:41 p.m. (2016-01-22 13:41:35 UTC) #6
Oleksandr
LGTM, thanks.
Jan. 22, 2016, 2:06 p.m. (2016-01-22 14:06:24 UTC) #7
sergei
Jan. 22, 2016, 2:35 p.m. (2016-01-22 14:35:38 UTC) #8
LGTM

Powered by Google App Engine
This is Rietveld