commit | e265bde6fee233a96f87ca46464dd662531e0f90 | [log] [tgz] |
---|---|---|
author | Lei Zhang <thestig@chromium.org> | Tue May 06 09:30:18 2025 -0700 |
committer | Pdfium LUCI CQ <pdfium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Tue May 06 09:30:18 2025 -0700 |
tree | 3e499c4225d13a36d5cf3051d67c19c5bb64c5c6 | |
parent | 4d936fae88e88fccdc1422bab23d5b10022a4036 [diff] |
Fix botched UnownedPtr refactor Fix parts of https://pdfium-review.googlesource.com/131530 that are obviously wrong but only gets compiled when PA is disabled. Change-Id: I0d02508cdba29bffcc81f3175248a05e1f2ca034 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/131730 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
diff --git a/core/fxcrt/unowned_ptr.h b/core/fxcrt/unowned_ptr.h index 77b9167..8218c58 100644 --- a/core/fxcrt/unowned_ptr.h +++ b/core/fxcrt/unowned_ptr.h
@@ -149,9 +149,9 @@ ~UnownedPtr() { obj_ = nullptr; } friend inline bool operator==(const UnownedPtr& lhs, std::nullptr_t rhs) { - return obj_ == nullptr; + return lhs.obj_ == nullptr; } - friend inline bool operator==(const UnownedPtr& rhs, const UnownedPtr& rhs) { + friend inline bool operator==(const UnownedPtr& lhs, const UnownedPtr& rhs) { return lhs.obj_ == rhs.obj_; } bool operator<(const UnownedPtr& that) const {