diff options
author | dcheng <dcheng@chromium.org> | 2014-10-14 15:42:04 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-10-14 22:42:51 +0000 |
commit | 9961abd411eab6ec1cf9421078dfdaa001a7e2b5 (patch) | |
tree | 523c6acca5ec4a678fc920b53b82f4a4b41d06ec /crypto/symmetric_key_nss.cc | |
parent | 42f3be833bb3854c6143574f92a1ec6f973508b5 (diff) | |
download | chromium_src-9961abd411eab6ec1cf9421078dfdaa001a7e2b5.zip chromium_src-9961abd411eab6ec1cf9421078dfdaa001a7e2b5.tar.gz chromium_src-9961abd411eab6ec1cf9421078dfdaa001a7e2b5.tar.bz2 |
Allow custom deleters to opt out of self reset checks for scoped_ptr.
The self-reset check makes sense for the default deleters, because it
would otherwise leave a dangling pointer stored in the scoped_ptr.
However, a custom deleter might actually decrement a reference count
under the hood. This self-reset check can make assignment operators
implementation a lot uglier. One example is net's KeyPair: because
there might be a self-assignment, the original code needed to proxy
the incoming scoped_ptrs via a stack temporary before moving them
into their final location.
BUG=418347
Review URL: https://codereview.chromium.org/610533003
Cr-Commit-Position: refs/heads/master@{#299571}
Diffstat (limited to 'crypto/symmetric_key_nss.cc')
0 files changed, 0 insertions, 0 deletions