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

Issue 1852603002: Replacing most of web_task.h with base::Closure + base::WeakPtrFactory. (Closed)

Created:
4 years, 8 months ago by Łukasz Anforowicz
Modified:
4 years, 8 months ago
CC:
chromium-reviews, jochen+watch_chromium.org, mlamouri+watch-test-runner_chromium.org, site-isolation-reviews_chromium.org, toyoshim+midi_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@move-mocks-to-test-runner
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Replacing most of web_task.h with base::Closure + base::WeakPtrFactory. WebMethodTask was used to wrap and invoke a method pointer. This can be replaced by wrapping the method in a base::Closure instead. When WebTaskList was used as a field of an object, it would make sure that after the object's destruction, no associated callbacks / WebTasks would run. The same functionality can be accomplished via base::WeakPtrFactory which has the same effect of suppressing base::Callbacks after the WeakPtrFactory dies. There were also a few implementations of test_runner::WebTask other than test_runner::WebMethodTask - these other implementations could also be simplified by building on top of base::Callback. BUG=595089 Committed: https://crrev.com/c935882393f5644d8e06c2fbeaeab65f9527ffcb Cr-Commit-Position: refs/heads/master@{#385752}

Patch Set 1 #

Patch Set 2 : Rebasing... #

Patch Set 3 : Rebasing + fixed reposting behavior for TestRunner / V8Callbacks. #

Patch Set 4 : More fixes... #

Patch Set 5 : Fixing a test. #

Total comments: 1

Patch Set 6 : Rebasing... #

Unified diffs Side-by-side diffs Delta from patch set Stats (+445 lines, -769 lines) Patch
M components/test_runner/event_sender.h View 3 chunks +0 lines, -5 lines 0 comments Download
M components/test_runner/event_sender.cc View 5 chunks +13 lines, -53 lines 0 comments Download
M components/test_runner/mock_color_chooser.h View 2 chunks +3 lines, -3 lines 0 comments Download
M components/test_runner/mock_color_chooser.cc View 2 chunks +9 lines, -18 lines 0 comments Download
M components/test_runner/mock_web_media_stream_center.h View 1 2 3 4 5 3 chunks +2 lines, -6 lines 0 comments Download
M components/test_runner/mock_web_media_stream_center.cc View 1 2 3 4 5 1 chunk +0 lines, -8 lines 0 comments Download
M components/test_runner/mock_web_midi_accessor.h View 2 chunks +5 lines, -5 lines 0 comments Download
M components/test_runner/mock_web_midi_accessor.cc View 2 chunks +12 lines, -28 lines 0 comments Download
M components/test_runner/mock_web_speech_recognizer.h View 4 chunks +4 lines, -13 lines 0 comments Download
M components/test_runner/mock_web_speech_recognizer.cc View 4 chunks +22 lines, -12 lines 0 comments Download
M components/test_runner/mock_web_user_media_client.h View 3 chunks +4 lines, -6 lines 0 comments Download
M components/test_runner/mock_web_user_media_client.cc View 1 2 3 4 5 6 chunks +19 lines, -98 lines 0 comments Download
M components/test_runner/mock_webrtc_data_channel_handler.h View 3 chunks +6 lines, -5 lines 0 comments Download
M components/test_runner/mock_webrtc_data_channel_handler.cc View 3 chunks +25 lines, -26 lines 0 comments Download
M components/test_runner/mock_webrtc_dtmf_sender_handler.h View 3 chunks +5 lines, -6 lines 0 comments Download
M components/test_runner/mock_webrtc_dtmf_sender_handler.cc View 3 chunks +16 lines, -22 lines 0 comments Download
M components/test_runner/mock_webrtc_peer_connection_handler.h View 4 chunks +14 lines, -5 lines 0 comments Download
M components/test_runner/mock_webrtc_peer_connection_handler.cc View 11 chunks +80 lines, -163 lines 0 comments Download
M components/test_runner/spell_check_client.h View 1 2 3 4 5 3 chunks +3 lines, -5 lines 0 comments Download
M components/test_runner/spell_check_client.cc View 2 chunks +8 lines, -22 lines 0 comments Download
M components/test_runner/test_runner.h View 1 2 3 4 5 7 chunks +23 lines, -25 lines 0 comments Download
M components/test_runner/test_runner.cc View 1 2 3 4 5 19 chunks +148 lines, -122 lines 0 comments Download
M components/test_runner/web_task.h View 1 chunk +8 lines, -56 lines 0 comments Download
M components/test_runner/web_task.cc View 1 chunk +5 lines, -32 lines 0 comments Download
M components/test_runner/web_test_interfaces.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M components/test_runner/web_view_test_client.h View 3 chunks +2 lines, -5 lines 0 comments Download
M components/test_runner/web_view_test_client.cc View 1 2 4 chunks +7 lines, -18 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css/counters/counter-reparent-table-children-crash.html View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 8 (3 generated)
Łukasz Anforowicz
jochen@, could you please take a look? https://codereview.chromium.org/1852603002/diff/80001/third_party/WebKit/LayoutTests/fast/css/counters/counter-reparent-table-children-crash.html File third_party/WebKit/LayoutTests/fast/css/counters/counter-reparent-table-children-crash.html (right): https://codereview.chromium.org/1852603002/diff/80001/third_party/WebKit/LayoutTests/fast/css/counters/counter-reparent-table-children-crash.html#newcode16 third_party/WebKit/LayoutTests/fast/css/counters/counter-reparent-table-children-crash.html:16: testRunner.notifyDone(); This ...
4 years, 8 months ago (2016-04-06 23:56:49 UTC) #2
jochen (gone - plz use gerrit)
lgtm
4 years, 8 months ago (2016-04-07 03:38:18 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1852603002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1852603002/100001
4 years, 8 months ago (2016-04-07 14:07:51 UTC) #5
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 8 months ago (2016-04-07 14:43:54 UTC) #6
commit-bot: I haz the power
4 years, 8 months ago (2016-04-07 14:44:58 UTC) #8
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/c935882393f5644d8e06c2fbeaeab65f9527ffcb
Cr-Commit-Position: refs/heads/master@{#385752}

Powered by Google App Engine
This is Rietveld 408576698