Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MiraclePtr: Avoid storing ExtractAsDangling() into a variable.
ExtractAsDangling() converts the raw_ptr into a raw_ptr allowed to dangle. This is expected to be used immediately as a temporary object, and not stored as a naked pointer. This relies on C++ calling destructor of temporaries at the end of the full expression. It means MiraclePtr will continue to consider the object "referenced" during the expression and continue to protect against UAF during the callback call. Bug: None Change-Id: If9436fb9626253b24c51d2c1db1701d22513fcd3 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/206274 Auto-Submit: Arthur Sonzogni <[email protected]> Commit-Queue: Arthur Sonzogni <[email protected]> Reviewed-by: Corentin Wallez <[email protected]> Commit-Queue: Corentin Wallez <[email protected]>
- Loading branch information