Remove WebFrame from WebFramesManager before destruction.

WebFrame destructor can lead to calling callbacks that will
try to access the WebFrame via GetFrameWithId.
This leads to reentrancy problem on the std::map.
Remove the WebFrame from the map before destroying it.

Bug: 935000
Change-Id: I458cef209d509dd0c61acdb3b9da01cf301d49c1
Reviewed-on: https://chromium-review.googlesource.com/c/1488732
Reviewed-by: Eugene But <eugenebut@chromium.org>
Reviewed-by: Mike Dougherty <michaeldo@chromium.org>
Commit-Queue: Olivier Robin <olivierrobin@chromium.org>
Auto-Submit: Olivier Robin <olivierrobin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#636045}
1 file changed