Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(376)

Issue 1010073002: clang: Add a tool for MessageLoop refactoring (Closed)

Created:
5 years, 9 months ago by Sami
Modified:
4 years, 10 months ago
Reviewers:
hans, dcheng
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

clang: Add a tool for MessageLoop refactoring This tool performs refactoring on clients of MessageLoop and related APIs as described here: https://docs.google.com/a/chromium.org/document/d/1qxdh2I61_aB_Uzh1QgNqvdWFBCL_E65G2smoSySw7KU/edit?pli=1# Note that after running the tool, you should use the following script to fix includes and other things Clang doesn't know about: $ tools/clang/refactor_message_loop/update_task_runner_headers.sh BUG=465354

Patch Set 1 #

Patch Set 2 : More matching. #

Patch Set 3 : Message loop proxy getter. #

Patch Set 4 : Fix Thread::message_loop_proxy() too. #

Patch Set 5 : Rename variables #

Patch Set 6 : Finally made the scoped_ptr<> matcher work. #

Patch Set 7 : Cleanup. #

Patch Set 8 : Rebased. #

Patch Set 9 : Tests. #

Patch Set 10 : More tests. #

Total comments: 14

Patch Set 11 : Implement variable renaming #

Patch Set 12 : Rename *loop* too. #

Patch Set 13 : Added header fixing script. #

Patch Set 14 : Tweaks. #

Patch Set 15 : Member initializers #

Patch Set 16 : Discard overlapping edits. #

Patch Set 17 : Handle MLP::current() as field initializer #

Patch Set 18 : Handle more cases. #

Patch Set 19 : Handle references to refptrs and proxy getter functions. #

Patch Set 20 : Raw pointer getter. #

Patch Set 21 : Add fast path. #

Patch Set 22 : Add warning to script. #

Total comments: 6

Patch Set 23 : Review comments. #

Patch Set 24 : Don't use StringRef for mutable strings. #

Patch Set 25 : Also process headers. #

Total comments: 2

Patch Set 26 : Rework header editing support. #

Total comments: 8

Patch Set 27 : Removed some hacks. #

Total comments: 2

Patch Set 28 : Rebased. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1043 lines, -4 lines) Patch
A + tools/clang/refactor_message_loop/CMakeLists.txt View 1 2 3 4 5 6 2 chunks +4 lines, -4 lines 0 comments Download
A tools/clang/refactor_message_loop/RefactorMessageLoop.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +599 lines, -0 lines 0 comments Download
A tools/clang/refactor_message_loop/tests/test-expected.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +171 lines, -0 lines 0 comments Download
A tools/clang/refactor_message_loop/tests/test-original.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +171 lines, -0 lines 0 comments Download
A tools/clang/refactor_message_loop/update_task_runner_headers.sh View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 1 chunk +98 lines, -0 lines 0 comments Download

Messages

Total messages: 16 (2 generated)
Sami
Hey Hans, I'm a total n00b at this so any pointers are welcome :) In ...
5 years, 9 months ago (2015-03-19 20:10:10 UTC) #2
hans
On 2015/03/19 20:10:10, Sami wrote: > Hey Hans, I'm a total n00b at this so ...
5 years, 9 months ago (2015-03-19 21:37:28 UTC) #4
dcheng
On 2015/03/19 at 21:37:28, hans wrote: > On 2015/03/19 20:10:10, Sami wrote: > > Hey ...
5 years, 9 months ago (2015-03-19 23:44:48 UTC) #5
dcheng
On 2015/03/19 at 23:44:48, dcheng wrote: > On 2015/03/19 at 21:37:28, hans wrote: > > ...
5 years, 9 months ago (2015-03-20 02:09:06 UTC) #6
Sami
Thanks for the pointers! Would either of you be willing to rubberstamp this patch? It's ...
5 years, 7 months ago (2015-05-06 17:25:33 UTC) #7
dcheng
(Sorry, apparently I had a bunch of old drafts I never sent out. I don't ...
5 years, 7 months ago (2015-05-06 17:31:18 UTC) #8
Sami
Thanks! All comments addressed. https://codereview.chromium.org/1010073002/diff/180001/tools/clang/refactor_message_loop/RefactorMessageLoop.cpp File tools/clang/refactor_message_loop/RefactorMessageLoop.cpp (right): https://codereview.chromium.org/1010073002/diff/180001/tools/clang/refactor_message_loop/RefactorMessageLoop.cpp#newcode10 tools/clang/refactor_message_loop/RefactorMessageLoop.cpp:10: // => base::MessageLoop::task_runner()->PostTask*() On 2015/05/06 ...
5 years, 7 months ago (2015-05-07 10:37:37 UTC) #9
Sami
https://codereview.chromium.org/1010073002/diff/420001/tools/clang/scripts/run_tool.py File tools/clang/scripts/run_tool.py (right): https://codereview.chromium.org/1010073002/diff/420001/tools/clang/scripts/run_tool.py#newcode321 tools/clang/scripts/run_tool.py:321: extensions = frozenset(('.c', '.cc', '.h', '.m', '.mm')) On 2015/05/07 ...
5 years, 7 months ago (2015-05-07 13:31:35 UTC) #10
Sami
Friendly ping?
5 years, 7 months ago (2015-05-12 17:19:50 UTC) #11
dcheng
Sorry I'm in Sydney at BlinkOn atm, so just one quick thought. https://codereview.chromium.org/1010073002/diff/480001/tools/clang/scripts/run_tool.py File tools/clang/scripts/run_tool.py ...
5 years, 7 months ago (2015-05-13 05:07:05 UTC) #12
Sami
On 2015/05/13 05:07:05, dcheng wrote: > Sorry I'm in Sydney at BlinkOn atm, so just ...
5 years, 7 months ago (2015-05-13 18:33:36 UTC) #13
Sami
Ready for another pass on this one?
5 years, 6 months ago (2015-05-26 20:23:28 UTC) #14
dcheng
Sorry, I have some comments queued but forgot to send. As mentioned in PS27 though, ...
5 years, 6 months ago (2015-05-26 20:35:44 UTC) #15
dcheng
5 years, 6 months ago (2015-05-26 20:36:11 UTC) #16
(Also, if you want to land the run_tool.py changes separately, that'd be fine
with me)

Powered by Google App Engine
This is Rietveld 408576698