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

Issue 1916703002: Prepare for move-only PassOwnPtr in the remaining directories. (Closed)

Created:
4 years, 8 months ago by Yuta Kitamura
Modified:
4 years, 8 months ago
Reviewers:
*haraken, *tkent, *tzik
CC:
jbroman, Mads Ager (chromium), ajuma+watch-canvas_chromium.org, apavlov+blink_chromium.org, blink-reviews, blink-reviews-api_chromium.org, blink-reviews-events_chromium.org, blink-reviews-platform-graphics_chromium.org, blink-reviews-wtf_chromium.org, Rik, caseq+blink_chromium.org, chromium-reviews, danakj+watch_chromium.org, devtools-reviews_chromium.org, dglazkov+blink, dshwang, drott+blinkwatch_chromium.org, krit, dtapuska+blinkwatch_chromium.org, eae+blinkwatch, f(malita), haraken, hongchan, Justin Novosad, kinuko+watch, kinuko+fileapi, kouhei+heap_chromium.org, kozyatinskiy+blink_chromium.org, lushnikov+blink_chromium.org, Mikhail, nhiroki, oilpan-reviews, pdr+graphicswatchlist_chromium.org, pfeldman+blink_chromium.org, piman+watch_chromium.org, rwlbuis, Raymond Toy, scheduler-bugs_chromium.org, Stephen Chennney, sergeyv+blink_chromium.org, tzik
Base URL:
https://chromium.googlesource.com/chromium/src.git@core1
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Prepare for move-only PassOwnPtr in the remaining directories. The changes are mechanical and mostly trivial; they will usually fall under one of the following buckets: * Adding std::move() in a place where copying of PassOwnPtr takes place. * Adding passed() for a callback argument that will be "auto-passed" to the function. * Remove const from PassOwnPtr<T> type, since that will be incompatible with move-only PassOwnPtr. There are a few unusual instances: * platform/network/ResourceTimingInfo.h: The CrossThreadCopier specialization needs to return a PassedWrapper<> object. * platform/threading/BackgroundTaskRunner.cpp: Convert PassOwnPtr to std::unique_ptr; additional use of base::Passed requires a new DEPS entry. * wtf/Functional.h: It is sufficient to receive a PassOwnPtr as a const reference. * public/WebContentSettingCallbacks.h and public/WebFileSystemCallbacks.h: These headers cannot include PassOwnPtr.h, so the functions declared there must take a PassOwnPtr as an rvalue reference. All these changes are no-op for now, but will be necessary when PassOwnPtr becomes move-only. BUG=582349 Committed: https://crrev.com/7f32753bce23595c54633f13592f768823e324ba Cr-Commit-Position: refs/heads/master@{#389744}

Patch Set 1 #

Patch Set 2 : Merge with trunk. #

Total comments: 5

Patch Set 3 : Fix TraceEvent. #

Patch Set 4 : Use base::Owned. #

Patch Set 5 : Merge with trunk. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+74 lines, -70 lines) Patch
M third_party/WebKit/Source/platform/TraceEvent.h View 1 2 8 chunks +16 lines, -15 lines 0 comments Download
M third_party/WebKit/Source/platform/WebThreadSupportingGC.h View 2 3 4 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/platform/audio/AudioBus.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/exported/WebContentSettingCallbacks.cpp View 1 chunk +5 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/platform/exported/WebFileSystemCallbacks.cpp View 1 chunk +5 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridgeTest.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/graphics/CompositorMutatorClient.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/graphics/gpu/DrawingBufferTest.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/heap/ThreadState.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/network/ResourceTimingInfo.h View 2 chunks +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/scheduler/CancellableTaskFactoryTest.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/testing/FontTestHelpers.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/threading/BackgroundTaskRunner.cpp View 1 2 3 2 chunks +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/threading/DEPS View 1 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/web/InspectorOverlay.cpp View 1 3 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/web/LocalFileSystemClient.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/web/SharedWorkerRepositoryClientImpl.cpp View 2 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/web/WebDOMActivityLogger.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/web/WebDevToolsAgentImpl.cpp View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp View 1 3 chunks +5 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/web/WebLocalFrameImpl.cpp View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/web/WebPepperSocketChannelClientProxy.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp View 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/web/WorkerContentSettingsClient.cpp View 2 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/wtf/Functional.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/wtf/HashTraits.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/public/platform/WebContentSettingCallbacks.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/public/platform/WebFileSystemCallbacks.h View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 42 (19 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1916703002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1916703002/1
4 years, 8 months ago (2016-04-25 06:50:41 UTC) #2
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: ios_dbg_simulator_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator_ninja/builds/164737) ios_rel_device_gn on ...
4 years, 8 months ago (2016-04-25 06:53:16 UTC) #4
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1916703002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1916703002/20001
4 years, 8 months ago (2016-04-25 11:37:30 UTC) #6
Yuta Kitamura
PTAL? +tzik for general review +tkent for approval for changes in public/platform +haraken for approval ...
4 years, 8 months ago (2016-04-25 11:38:53 UTC) #10
haraken
LGTM https://codereview.chromium.org/1916703002/diff/20001/third_party/WebKit/Source/platform/threading/BackgroundTaskRunner.cpp File third_party/WebKit/Source/platform/threading/BackgroundTaskRunner.cpp (right): https://codereview.chromium.org/1916703002/diff/20001/third_party/WebKit/Source/platform/threading/BackgroundTaskRunner.cpp#newcode23 third_party/WebKit/Source/platform/threading/BackgroundTaskRunner.cpp:23: base::WorkerPool::PostTask(baseLocation, base::Bind(&RunBackgroundTask, base::Passed(std::unique_ptr<CrossThreadClosure>(closure.leakPtr()))), taskSize == TaskSizeLongRunningTask); so complicated... ...
4 years, 8 months ago (2016-04-25 11:44:42 UTC) #11
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: cast_shell_linux on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linux/builds/150078)
4 years, 8 months ago (2016-04-25 12:12:54 UTC) #13
tzik
https://codereview.chromium.org/1916703002/diff/20001/third_party/WebKit/Source/platform/threading/BackgroundTaskRunner.cpp File third_party/WebKit/Source/platform/threading/BackgroundTaskRunner.cpp (right): https://codereview.chromium.org/1916703002/diff/20001/third_party/WebKit/Source/platform/threading/BackgroundTaskRunner.cpp#newcode23 third_party/WebKit/Source/platform/threading/BackgroundTaskRunner.cpp:23: base::WorkerPool::PostTask(baseLocation, base::Bind(&RunBackgroundTask, base::Passed(std::unique_ptr<CrossThreadClosure>(closure.leakPtr()))), taskSize == TaskSizeLongRunningTask); Can we use ...
4 years, 8 months ago (2016-04-25 12:22:33 UTC) #14
jbroman
Drive-by question, sorry. Normally we pass PassOwnPtr by value rather than by rvalue reference; if ...
4 years, 8 months ago (2016-04-25 15:08:27 UTC) #15
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1916703002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1916703002/20001
4 years, 8 months ago (2016-04-26 02:55:51 UTC) #17
Yuta Kitamura
https://codereview.chromium.org/1916703002/diff/20001/third_party/WebKit/public/platform/WebContentSettingCallbacks.h File third_party/WebKit/public/platform/WebContentSettingCallbacks.h (right): https://codereview.chromium.org/1916703002/diff/20001/third_party/WebKit/public/platform/WebContentSettingCallbacks.h#newcode32 third_party/WebKit/public/platform/WebContentSettingCallbacks.h:32: BLINK_PLATFORM_EXPORT WebContentSettingCallbacks(WTF::PassOwnPtr<ContentSettingCallbacks>&&); On 2016/04/25 15:08:27, jbroman wrote: > drive-by: ...
4 years, 8 months ago (2016-04-26 02:57:29 UTC) #18
tkent
lgtm. BTW, it's ok to include PassOwnPtr.h in public headers, like #if INSIDE_BLINK #include "wtf/PassOwnPtr.h" ...
4 years, 8 months ago (2016-04-26 03:04:19 UTC) #19
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_ozone_rel_ng/builds/160382)
4 years, 8 months ago (2016-04-26 03:30:11 UTC) #21
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1916703002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1916703002/60001
4 years, 8 months ago (2016-04-26 06:08:48 UTC) #23
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: ios_dbg_simulator_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator_ninja/builds/165411) ios_rel_device_gn on ...
4 years, 8 months ago (2016-04-26 06:10:43 UTC) #25
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1916703002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1916703002/80001
4 years, 8 months ago (2016-04-26 07:00:54 UTC) #27
Yuta Kitamura
tzik: PTAL at PS2:5? Re PassOwnPtr<T>&&, I'd like to keep the rvalue reference, because that ...
4 years, 8 months ago (2016-04-26 07:10:53 UTC) #28
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win_chromium_compile_dbg_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_compile_dbg_ng/builds/180507)
4 years, 8 months ago (2016-04-26 08:22:46 UTC) #30
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1916703002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1916703002/80001
4 years, 8 months ago (2016-04-26 08:28:37 UTC) #32
tzik
lgtm
4 years, 8 months ago (2016-04-26 09:08:17 UTC) #33
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 8 months ago (2016-04-26 10:35:21 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1916703002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1916703002/80001
4 years, 8 months ago (2016-04-26 10:52:18 UTC) #38
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 8 months ago (2016-04-26 10:56:55 UTC) #40
commit-bot: I haz the power
4 years, 8 months ago (2016-04-26 10:57:48 UTC) #42
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/7f32753bce23595c54633f13592f768823e324ba
Cr-Commit-Position: refs/heads/master@{#389744}

Powered by Google App Engine
This is Rietveld 408576698