summaryrefslogtreecommitdiff
path: root/core/fxcrt/cfx_retain_ptr_unittest.cpp
AgeCommit message (Collapse)Author
2017-03-28Ensure that CFX_RetainPtr move ctor is used by std::vector.Tom Sepez
Add a test for one of our types that fails unless this is the case. Mark all our other move ctors as |noexcept|. Change-Id: Ib106f219183d5abf94504af420a43c94b8f40e22 Reviewed-on: https://pdfium-review.googlesource.com/3251 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
2017-03-23Fix CFX_RetainPtr move-assign semantics.Tom Sepez
Ensure moved value becomes a nullptr after the move. Update comment while we're at it. Change-Id: I7a2999d5f5c5142cc7826cd7880b1e2317b5445f Reviewed-on: https://pdfium-review.googlesource.com/3163 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2017-01-04Add missing operator<() to CFX_RetainPtr.tsepez
Use std::less<>() rather than a direct ptr1 < ptr2 comparison to be strictly correct in face of unspecified behaviour when ptr1 and ptr2 don't point within the same "object" (e.g. segment of memory on a brain-dead segmented architecture). This will allow their use as keys in maps. Review-Url: https://codereview.chromium.org/2616683002
2017-01-03Add CFX_RetainPtr Leak() and Unleak() methodstsepez
Required to pass pointers across C-APIs. Need this to clean up CPDFXFA_Page and retain ptrs. Review-Url: https://codereview.chromium.org/2583093003
2016-11-29Add pdfium::MakeRetain<>() helper function.tsepez
Part of the work to get rid of |new|s. Stripped from a forthcoming CL. Review-Url: https://codereview.chromium.org/2536973003
2016-09-29Move core/fxcrt/include to core/fxcrtdsinclair
BUG=pdfium:611 Review-Url: https://codereview.chromium.org/2382723003
2016-09-08explicit operator bool for CFX_RetainPtr and CFX_CountRefchromium/2855tsepez
Review-Url: https://codereview.chromium.org/2324733003
2016-03-29Add a Retained Pointer smart class.tsepez
It's going to be hard to fix some XFA object leaks without this. Put this in fxcrt/ as we should be able to make the FX strings take advantage of this. BUG=pdfium:55 Review URL: https://codereview.chromium.org/1805683002