• Dominique Fauteux-Chapleau's avatar
    Reland "Handle sync paste deep scanning crash" · 887fdd82
    Dominique Fauteux-Chapleau authored
    This relands crrev.com/c/2633701 that was reverted by
    crrev.com/c/2637406. The cause of the flakiness was that the
    WebContents corresponding to the scan would get destroyed before the
    scan had finished, resulting in a segfault with |web_contents_|. The
    solution is to break the dependency of ContentAnalysisDelegate on that
    WebContents by extracting the required data from it at a moment when
    it's known to be non-null in the ctor.
    
    Original change's description:
    > Handle sync paste deep scanning crash
    >
    > This fixes the crash observed in crbug.com/1166233 and adds tests for
    > it. See the comments in that bug for more details.
    >
    > This fix also removes the dialog for unauthorized users for pasting
    > after the initial scan that does authentication, so crbug.com/1028133
    > is affected.
    >
    > Bug: 1166233, 1028133
    > Change-Id: Id3c992fdeccfa92a9f88e25c13e7a15bcb1afd8c
    > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2633701
    > Reviewed-by: anthonyvd <anthonyvd@chromium.org>
    > Commit-Queue: Dominique Fauteux-Chapleau <domfc@chromium.org>
    > Cr-Commit-Position: refs/heads/master@{#844787}
    
    Bug: 1166233, 1028133
    Change-Id: Ifc760b9489d810c460889e396430c82b4f80e858
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2638533Reviewed-by: default avataranthonyvd <anthonyvd@chromium.org>
    Commit-Queue: Dominique Fauteux-Chapleau <domfc@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#845263}
    887fdd82
content_analysis_delegate.cc 22.4 KB