[ MimeHandlerView ] Provisional fix for a browser crash

When a MimeHandlerView related resource is intercepted by the
PluginResponseInterceptorURLLoaderThrottle, loading is deferred to when
a MimeHandlerViewEmbedder is created on UI thread. However, this has
caused browser crashes on IO thread when PRIULT resumes loading. The
reason could be that PRIULT has *somehow* gone away and since the
callback uses the raw pointer for binding, it might be causing a UaF.

This CL uses a weak pointer for the callback as a provisional fix.

Bug: 966793
Change-Id: I24d8913ccb8fec52eb588b654febbb42f0880a15
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1626339
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Ehsan Karamad <ekaramad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#663112}
2 files changed