Commit fdde8d2e authored by Min Qin's avatar Min Qin Committed by Chromium LUCI CQ

Fix a download extension crash for manifest V3

Manifest v3 use service workers, so there is no RenderFrameHost.

BUG=1168219

Change-Id: Idb777abe6b2be1fff9175271d30dfba7b682eceb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2644100Reviewed-by: default avatarXing Liu <xingliu@chromium.org>
Commit-Queue: Min Qin <qinmin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#845867}
parent f8bc1fdb
......@@ -1036,7 +1036,8 @@ ExtensionFunction::ResponseAction DownloadsDownloadFunction::Run() {
std::unique_ptr<download::DownloadUrlParameters> download_params(
new download::DownloadUrlParameters(
download_url, source_process_id(),
render_frame_host()->GetRoutingID(), traffic_annotation));
render_frame_host() ? render_frame_host()->GetRoutingID() : -1,
traffic_annotation));
base::FilePath creator_suggested_filename;
if (options.filename.get()) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment