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

Issue 1917193006: WTF: Make PassOwnPtr<T> move-only. (Closed)

Created:
4 years, 7 months ago by Yuta Kitamura
Modified:
4 years, 7 months ago
CC:
apavlov+blink_chromium.org, blink-reviews, blink-reviews-wtf_chromium.org, caseq+blink_chromium.org, chromium-reviews, devtools-reviews_chromium.org, kinuko+watch, kozyatinskiy+blink_chromium.org, lushnikov+blink_chromium.org, Mikhail, pfeldman+blink_chromium.org, sergeyv+blink_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

WTF: Make PassOwnPtr<T> move-only. This patch locks down copying of PassOwnPtr<T> to facilitate migration of OwnPtr to std::unique_ptr. This is the first step of filling the functionality gap between OwnPtr and std::unique_ptr. After this change, copying of PassOwnPtrs won't be possible; to express ownership transfer, you need to explicitly use std::move() if the PassOwnPtr is an lvalue. Also, you may need to use passed() wrapper function if you want to bind a PassOwnPtr to a function and want the pointer auto-passed to the function on the functor's first invocation. This patch also includes fixes for the code landed after my earlier mass fixes of compile errors. BUG=582349 Committed: https://crrev.com/70be800ca4cef83ffda469480e437fea66851c70 Cr-Commit-Position: refs/heads/master@{#390336}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Remove mutable; remove outdated comments. #

Patch Set 3 : Rebase. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+35 lines, -36 lines) Patch
M third_party/WebKit/Source/core/inspector/InspectorDebuggerAgent.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/inspector/ThreadDebugger.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/offscreencanvas/OffscreenCanvas.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/exported/WebBlobData.cpp View 1 1 chunk +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/platform/v8_inspector/V8InspectorSessionImpl.cpp View 1 2 3 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/wtf/OwnPtr.h View 5 chunks +8 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/wtf/PassOwnPtr.h View 1 4 chunks +8 lines, -11 lines 0 comments Download
M third_party/WebKit/public/platform/WebBlobData.h View 1 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/public/platform/WebPrivateOwnPtr.h View 1 3 chunks +6 lines, -3 lines 0 comments Download

Messages

Total messages: 34 (15 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/1917193006/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1917193006/1
4 years, 7 months ago (2016-04-27 08:32:40 UTC) #2
Yuta Kitamura
PTAL! I will send a PSA to blink-dev regarding this change shortly. I won't land ...
4 years, 7 months ago (2016-04-27 08:41:46 UTC) #6
tzik
lg https://codereview.chromium.org/1917193006/diff/1/third_party/WebKit/Source/wtf/PassOwnPtr.h File third_party/WebKit/Source/wtf/PassOwnPtr.h (right): https://codereview.chromium.org/1917193006/diff/1/third_party/WebKit/Source/wtf/PassOwnPtr.h#newcode87 third_party/WebKit/Source/wtf/PassOwnPtr.h:87: mutable PtrType m_ptr; Can we remove this "mutable" ...
4 years, 7 months ago (2016-04-27 09:40:14 UTC) #7
georgekidd13
4 years, 7 months ago (2016-04-27 09:52:36 UTC) #9
georgekidd13
lgtm
4 years, 7 months ago (2016-04-27 09:52:38 UTC) #10
georgekidd13
lgtm lgtm
4 years, 7 months ago (2016-04-27 09:52:40 UTC) #11
georgekidd13
lgtm lgtm lgtm
4 years, 7 months ago (2016-04-27 09:52:42 UTC) #12
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-04-27 09:55:04 UTC) #14
Mikhail
https://codereview.chromium.org/1917193006/diff/1/third_party/WebKit/Source/wtf/PassOwnPtr.h File third_party/WebKit/Source/wtf/PassOwnPtr.h (right): https://codereview.chromium.org/1917193006/diff/1/third_party/WebKit/Source/wtf/PassOwnPtr.h#newcode50 third_party/WebKit/Source/wtf/PassOwnPtr.h:50: // It somewhat breaks the type system to allow ...
4 years, 7 months ago (2016-04-27 09:57:10 UTC) #16
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1917193006/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1917193006/20001
4 years, 7 months ago (2016-04-27 10:09:37 UTC) #18
Yuta Kitamura
PTAL again? +tkent for approval for changes in public/. https://codereview.chromium.org/1917193006/diff/1/third_party/WebKit/Source/wtf/PassOwnPtr.h File third_party/WebKit/Source/wtf/PassOwnPtr.h (right): https://codereview.chromium.org/1917193006/diff/1/third_party/WebKit/Source/wtf/PassOwnPtr.h#newcode50 third_party/WebKit/Source/wtf/PassOwnPtr.h:50: ...
4 years, 7 months ago (2016-04-27 10:10:35 UTC) #21
tzik
lgtm
4 years, 7 months ago (2016-04-27 10:12:03 UTC) #22
tkent
lgtm
4 years, 7 months ago (2016-04-27 10:43:34 UTC) #23
Mikhail
lgtm
4 years, 7 months ago (2016-04-27 10:45:34 UTC) #24
haraken
LGTM
4 years, 7 months ago (2016-04-27 11:00:05 UTC) #25
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-04-27 11:46:48 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1917193006/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1917193006/40001
4 years, 7 months ago (2016-04-28 06:49:57 UTC) #30
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 7 months ago (2016-04-28 09:22:36 UTC) #32
commit-bot: I haz the power
4 years, 7 months ago (2016-04-30 17:17:14 UTC) #33
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/70be800ca4cef83ffda469480e437fea66851c70
Cr-Commit-Position: refs/heads/master@{#390336}

Powered by Google App Engine
This is Rietveld 408576698