Commit 5d8a530b authored by felt's avatar felt Committed by Commit bot

Dismiss permission bubble request if it's a duplicate

Currently seeing a crash when two iframes from the same origin request the
same permission. The issue arises because they have the same ID and therefore
the same entry in the hash map, which makes the request_ptr destruct. This CL
cancels the second (redundant) permission request.

BUG=433877

Review URL: https://codereview.chromium.org/799783002

Cr-Commit-Position: refs/heads/master@{#313673}
parent bca7a2e3
......@@ -118,6 +118,8 @@ void PermissionContextBase::DecidePermission(
permission_type_, requesting_origin);
if (PermissionBubbleManager::Enabled()) {
if (pending_bubbles_.get(id.ToString()) != NULL)
return;
PermissionBubbleManager* bubble_manager =
PermissionBubbleManager::FromWebContents(web_contents);
DCHECK(bubble_manager);
......
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