DescriptionWTF: 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. #Messages
Total messages: 34 (15 generated)
|