Skip to content
Commit 613ba331 authored by Karan Bhatia's avatar Karan Bhatia Committed by Commit Bot
Browse files

Extensions: Fix memory leak in ExtensionApiFrameIdMap.

Currently in ExtensionApiFrameIdMap::UpdateTabAndWindowId and
ExtensionApiFrameIdMap::LookupFrameDataOnUI we don't check whether a
RenderFrameHost is alive, before storing it's frame data. It's possible that
such a RenderFrameHost never becomes alive, and hence we don't get any
OnRenderFrameDeleted notification for it. Since ExtensionApiFrameIdMap is a
singleton, this causes a memory leak. To fix, ensure that only live
RenderFrameHosts are tracked.

Also ensure in InProcessBrowserTest::TearDown that ExtensionApiFrameIdMap is not
leaking memory for any browser test.

BUG=817205

Change-Id: I78bf06cee7e10465f9eb5973ee8e59f525a74d93
Reviewed-on: https://chromium-review.googlesource.com/951975


Reviewed-by: default avatarScott Violet <sky@chromium.org>
Reviewed-by: default avatarDevlin <rdevlin.cronin@chromium.org>
Commit-Queue: Karan Bhatia <karandeepb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#541950}
parent 13e55a33
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment