Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: cherry-pick f427936d32db from chromium #34685

Merged
merged 4 commits into from Jul 5, 2022

Conversation

nornagon
Copy link
Member

[M102] Ensure raw_ptr and T* are treated identically in //base callback.

There are safety checks associated with raw pointers (e.g. ensuring
receiver pointers are not raw pointers). Make sure these checks are
applied whether the input type is T* or raw_ptr.

  • Implement base::IsPointer and base::RemovePointer, which are
    similar to std::is_pointer and std::remove_pointer, except they
    also consider raw_ptr a raw pointer type.
  • Fix failures from the strengthened asserts: WebAppInstallFinalizer
    does not need a callback at all, while the privacy sandbox dialog
    tests can safely use base::Unretained().
  • Add test cases to cover this in the //base callback nocompile test
    suite.
  • Fix the existing nocompile tests, which did not escape || and
    inadvertently matched any error text.

(cherry picked from commit 00c072a2c7f24921af3bbf8441abb34ecb0551a6)

Bug: 1335458
Change-Id: I470e3d5bc35ed52bf125136db738a868ef90b7e7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3700700
Reviewed-by: Lei Zhang thestig@chromium.org
Commit-Queue: Daniel Cheng dcheng@chromium.org
Cr-Original-Commit-Position: refs/heads/main@{#1013266}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3703779
Cr-Commit-Position: refs/branch-heads/5005@{#1173}
Cr-Branched-From: 5b4d9450fee01f821b6400e947b3839727643a71-refs/heads/main@{#992738}

Ref electron/security#172

Notes: Security: backported fix for 1335458.

@nornagon nornagon requested review from a team as code owners June 21, 2022 20:55
@nornagon nornagon added 18-x-y backport-check-skip Skip trop's backport validity checking security 🔒 semver/patch backwards-compatible bug fixes labels Jun 21, 2022
@electron-cation electron-cation bot added new-pr 🌱 PR opened in the last 24 hours and removed new-pr 🌱 PR opened in the last 24 hours labels Jun 21, 2022
Copy link
Contributor

@jkleinsc jkleinsc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Patch fails to apply

@ppontes
Copy link
Member

ppontes commented Jun 29, 2022

Patch fails to apply

@jkleinsc, fixed. CI failure seems unrelated.

@jkleinsc jkleinsc merged commit 18fd51a into 18-x-y Jul 5, 2022
@jkleinsc jkleinsc deleted the cherry-pick/18-x-y/chromium/f427936d32db branch July 5, 2022 17:51
@release-clerk
Copy link

release-clerk bot commented Jul 5, 2022

Release Notes Persisted

Security: backported fix for 1335458.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
18-x-y backport-check-skip Skip trop's backport validity checking security 🔒 semver/patch backwards-compatible bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants