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

Issue 29330403: Issue #1467, #3397 - Rewrite the map from threads to tabs (Closed)

Created:
Nov. 18, 2015, 7:42 p.m. by Eric
Modified:
July 27, 2016, 8:14 p.m.
Reviewers:
sergei, Oleksandr
CC:
Felix Dahlke
Visibility:
Public.

Description

Issue #1467, #3397 - Rewrite the map from threads to tabs Remove 's_threadInstances' and certain uses of 's_criticalSectionLocal'. Replace them with a new class that encapsulates a map instance together with its own mutex. Add unit tests for the new class. Change where thread entries are inserted from OnWindowStateChanged() to SetSite(). Replace GetTab(DWORD) to GetTabCurrentThread(), since the original function was always called with the same argument, the result of GetCurrentThreadId(). Also, move other calls to this function into a single class definition.

Patch Set 1 : #

Patch Set 2 : rebase only #

Total comments: 67

Patch Set 3 : rebase to current tip / address comments #

Total comments: 9

Patch Set 4 : rebase / fix copyright year #

Total comments: 8

Patch Set 5 : rename some symbols #

Total comments: 6

Patch Set 6 : add comment; new function body #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+229 lines, -40 lines) Patch
M adblockplus.gyp View 1 2 2 chunks +3 lines, -0 lines 0 comments Download
A src/plugin/Instances.h View 1 2 3 4 5 1 chunk +99 lines, -0 lines 3 comments Download
M src/plugin/PluginClass.h View 1 2 3 4 4 chunks +1 line, -4 lines 0 comments Download
M src/plugin/PluginClass.cpp View 1 2 3 4 9 chunks +56 lines, -35 lines 0 comments Download
M src/plugin/PluginWbPassThrough.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
A test/plugin/InstancesTest.cpp View 1 2 3 4 1 chunk +69 lines, -0 lines 0 comments Download

Messages

Total messages: 20
Eric
I've been fiddling at the edges of this for a few days. This version seems ...
Nov. 23, 2015, 1:39 p.m. (2015-11-23 13:39:14 UTC) #1
Eric
New patch set is a rebase to current tip. Includes the recent modifications to 'SetSite()'. ...
Dec. 8, 2015, 7:47 p.m. (2015-12-08 19:47:07 UTC) #2
Eric
Update issue description to reference a new defect ticket #3397. Correctly initialize entries in the ...
Dec. 9, 2015, 1:43 p.m. (2015-12-09 13:43:48 UTC) #3
Eric
OK. It's been a month now with no comment at all. It's been a day ...
Dec. 22, 2015, 12:50 p.m. (2015-12-22 12:50:27 UTC) #4
sergei
On 2015/12/22 12:50:27, Eric wrote: > OK. It's been a month now with no comment ...
Jan. 26, 2016, 11:03 p.m. (2016-01-26 23:03:16 UTC) #5
Eric
On 2016/01/26 23:03:16, sergei wrote: > That's really not convincing that it does work as ...
Jan. 29, 2016, 2:08 p.m. (2016-01-29 14:08:20 UTC) #6
sergei
On 2016/01/29 14:08:20, Eric wrote: > On 2016/01/26 23:03:16, sergei wrote: > > That's really ...
Jan. 29, 2016, 2:49 p.m. (2016-01-29 14:49:13 UTC) #7
Oleksandr
I have been able to reproduce the case when SetSite and OnWindowsStateChanged are called from ...
Feb. 1, 2016, 10:53 a.m. (2016-02-01 10:53:29 UTC) #8
Eric
On 2016/02/01 10:53:29, Oleksandr wrote: > I have been able to reproduce the case when ...
Feb. 1, 2016, 12:14 p.m. (2016-02-01 12:14:59 UTC) #9
sergei
All in all, I don't mind about having synchronized map (of course with proper implementation) ...
Feb. 1, 2016, 3:50 p.m. (2016-02-01 15:50:44 UTC) #10
Eric
On 2016/02/01 15:50:44, sergei wrote: > All in all, I don't mind about having synchronized ...
Feb. 3, 2016, 5:17 p.m. (2016-02-03 17:17:02 UTC) #11
sergei
I would propose to split this change into two commits, the first one contains SyncMap ...
Feb. 8, 2016, 1:35 p.m. (2016-02-08 13:35:37 UTC) #12
Eric
Patch set 4 fixes a copyright date. It also includes a rebase. On 2016/02/08 13:35:37, ...
Feb. 8, 2016, 6:45 p.m. (2016-02-08 18:45:29 UTC) #13
Oleksandr
Overall I am fine with this after all. I am actually not able reproduce the ...
Feb. 10, 2016, 10:58 a.m. (2016-02-10 10:58:50 UTC) #14
Eric
Patch set 5 renames a couple of symbols. https://codereview.adblockplus.org/29330403/diff/29332460/src/plugin/Instances.h File src/plugin/Instances.h (right): https://codereview.adblockplus.org/29330403/diff/29332460/src/plugin/Instances.h#newcode54 src/plugin/Instances.h:54: bool ...
May 19, 2016, 5:23 p.m. (2016-05-19 17:23:59 UTC) #15
Oleksandr
LGTM
May 23, 2016, 11:11 a.m. (2016-05-23 11:11:30 UTC) #16
sergei
Although the code might work I cannot approve it because of the style. https://codereview.adblockplus.org/29330403/diff/29332460/src/plugin/Instances.h File ...
May 23, 2016, 1:14 p.m. (2016-05-23 13:14:50 UTC) #17
Eric
New patch set. https://codereview.adblockplus.org/29330403/diff/29332460/src/plugin/Instances.h File src/plugin/Instances.h (right): https://codereview.adblockplus.org/29330403/diff/29332460/src/plugin/Instances.h#newcode1 src/plugin/Instances.h:1: /* Both points addressed elsewhere. https://codereview.adblockplus.org/29330403/diff/29332460/src/plugin/Instances.h#newcode21 ...
July 17, 2016, 4:04 p.m. (2016-07-17 16:04:46 UTC) #18
sergei
LGTM https://codereview.adblockplus.org/29330403/diff/29332460/src/plugin/Instances.h File src/plugin/Instances.h (right): https://codereview.adblockplus.org/29330403/diff/29332460/src/plugin/Instances.h#newcode62 src/plugin/Instances.h:62: idMap[id] = p; On 2016/07/17 16:04:43, Eric wrote: ...
July 19, 2016, 7:56 a.m. (2016-07-19 07:56:11 UTC) #19
Eric
July 27, 2016, 8:14 p.m. (2016-07-27 20:14:22 UTC) #20
Fixed the missing space before commit.

https://codereview.adblockplus.org/29330403/diff/29347801/src/plugin/Instances.h
File src/plugin/Instances.h (right):

https://codereview.adblockplus.org/29330403/diff/29347801/src/plugin/Instance...
src/plugin/Instances.h:65: auto it = idMap.insert(std::make_pair(id,p));
On 2016/07/19 07:56:09, sergei wrote:
> missing space after comma

Fixed.

Powered by Google App Engine
This is Rietveld