Commit ffce5049 authored by Mike Dougherty's avatar Mike Dougherty Committed by Commit Bot

Update main WebFrame already exists DCHECK

This DCHECK occasionally triggers, but for unknown reasons. Update the
DCHECK to exclude re-registering the same main web frame. This will
separate the issue from the same frame being re-registered which will be
caught by the next, already existing DCHECK.

Bug: 1014227
Change-Id: Ic5a248f12467812e2b6b287565aa37f675935661
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2354713
Auto-Submit: Mike Dougherty <michaeldo@chromium.org>
Reviewed-by: default avatarEugene But <eugenebut@chromium.org>
Commit-Queue: Mike Dougherty <michaeldo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#798205}
parent db17600e
...@@ -119,7 +119,8 @@ void WebFramesManagerImpl::AddFrame(std::unique_ptr<WebFrame> frame) { ...@@ -119,7 +119,8 @@ void WebFramesManagerImpl::AddFrame(std::unique_ptr<WebFrame> frame) {
DCHECK(frame); DCHECK(frame);
DCHECK(!frame->GetFrameId().empty()); DCHECK(!frame->GetFrameId().empty());
if (frame->IsMainFrame()) { if (frame->IsMainFrame()) {
DCHECK(!main_web_frame_); DCHECK(!main_web_frame_ ||
(main_web_frame_->GetFrameId() == frame->GetFrameId()));
main_web_frame_ = frame.get(); main_web_frame_ = frame.get();
} }
DCHECK(web_frames_.count(frame->GetFrameId()) == 0); DCHECK(web_frames_.count(frame->GetFrameId()) == 0);
......
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