Quick fix for DCHECK failure by history navigation to urn:uuid subframes

Subframe history navigation to urn:uuid resource in WebBundle is not
supported yet. This patch makes such navigations cause a
NOTIMPLEMENTED() message, instead of DCHECK() failure.

Bug: 1180697
Change-Id: I6e36b35eca1022eb10f872120644a5a25e1cb118
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2716547
Reviewed-by: Hayato Ito <[email protected]>
Reviewed-by: Tsuyoshi Horo <[email protected]>
Reviewed-by: Kinuko Yasuda <[email protected]>
Commit-Queue: Kunihiko Sakamoto <[email protected]>
Cr-Commit-Position: refs/heads/master@{#857035}
diff --git a/content/browser/renderer_host/navigation_controller_impl.cc b/content/browser/renderer_host/navigation_controller_impl.cc
index 200980bf..b7a4205 100644
--- a/content/browser/renderer_host/navigation_controller_impl.cc
+++ b/content/browser/renderer_host/navigation_controller_impl.cc
@@ -3513,8 +3513,14 @@
   }
 
   if (!DoesURLMatchOriginForNavigation(dest_url, origin_to_commit)) {
-    DCHECK(false) << " url:" << dest_url
-                  << " origin:" << origin_to_commit.value();
+    if (!frame_tree_node->IsMainFrame() && dest_url.SchemeIs(url::kUrnScheme)) {
+      NOTIMPLEMENTED()
+          << "History navigation to urn:uuid resource in WebBundle is not"
+             "implemented. See crbug.com/1180697";
+    } else {
+      DCHECK(false) << " url:" << dest_url
+                    << " origin:" << origin_to_commit.value();
+    }
     return nullptr;
   }