 diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
-index cf3733f..065df39 100644
+index 018534073da1..48f3d0e7343b 100644
 --- a/content/browser/web_contents/web_contents_impl.cc
 +++ b/content/browser/web_contents/web_contents_impl.cc
-@@ -1581,6 +1581,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
+@@ -1759,6 +1759,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
    std::string unique_name;
    frame_tree_.root()->SetFrameName(params.main_frame_name, unique_name);
  

   // view hierarchy. We add this view as embedder's child here.
   // This would go in WebContentsViewGuest::CreateView, but that is too early to
   // access embedder_web_contents(). Therefore, we do it here.
+  if (parent_view->GetNativeView() != platform_view_->GetNativeView())
   parent_view->GetNativeView()->AddChild(platform_view_->GetNativeView());
 #endif  // defined(USE_AURA)
 }
 

 #if defined(USE_AURA)
+  if (!platform_view_->GetNativeView())
+    return;
   if (!base::FeatureList::IsEnabled(features::kMash)) {
-    old_parent_view->GetNativeView()->RemoveChild(
-        platform_view_->GetNativeView());
+    if (old_parent_view->GetNativeView() != platform_view_->GetNativeView())
+      old_parent_view->GetNativeView()->RemoveChild(
+          platform_view_->GetNativeView());
   }
 #endif  // defined(USE_AURA)
 }
@@ -146,11 +152,22 @@ RenderWidgetHostViewBase* WebContentsViewGuest::CreateViewForWidget(
         render_widget_host->GetView());
   }
