Remove window name on cross origin navigation: fix DCHECK crash
fix failed dcheck in https://source.chromium.org/chromium/chromium/src/+/refs/tags/140.0.7339.81:third_party/blink/renderer/core/frame/web_local_frame_impl.cc;l=2170 and adds a way to stay informed about the activation of MPArch (https://docs.google.com/document/d/1kAMkME-WGLX33ai7p6VBhUXM_iCBjBzRjHH-OynwBNA)
This commit is contained in:
@@ -7,11 +7,24 @@ See also: https://trac.webkit.org/changeset/209076/webkit
|
||||
Original License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
|
||||
License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
|
||||
---
|
||||
.../Remove-window-name-on-cross-origin-navigation.inc | 1 +
|
||||
third_party/blink/renderer/core/loader/document_loader.cc | 3 ++-
|
||||
2 files changed, 3 insertions(+), 1 deletion(-)
|
||||
content/browser/renderer_host/browsing_context_state.cc | 2 +-
|
||||
.../Remove-window-name-on-cross-origin-navigation.inc | 1 +
|
||||
third_party/blink/renderer/core/loader/document_loader.cc | 4 +++-
|
||||
3 files changed, 5 insertions(+), 2 deletions(-)
|
||||
create mode 100644 cromite_flags/content/public/common/content_features_cc/Remove-window-name-on-cross-origin-navigation.inc
|
||||
|
||||
diff --git a/content/browser/renderer_host/browsing_context_state.cc b/content/browser/renderer_host/browsing_context_state.cc
|
||||
--- a/content/browser/renderer_host/browsing_context_state.cc
|
||||
+++ b/content/browser/renderer_host/browsing_context_state.cc
|
||||
@@ -15,7 +15,7 @@
|
||||
#include "services/network/public/mojom/web_sandbox_flags.mojom.h"
|
||||
|
||||
namespace features {
|
||||
-BASE_FEATURE(kNewBrowsingContextStateOnBrowsingContextGroupSwap,
|
||||
+BASE_FEATURE_DISABLED(kNewBrowsingContextStateOnBrowsingContextGroupSwap,
|
||||
"NewBrowsingContextStateOnBrowsingContextGroupSwap",
|
||||
base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
|
||||
diff --git a/cromite_flags/content/public/common/content_features_cc/Remove-window-name-on-cross-origin-navigation.inc b/cromite_flags/content/public/common/content_features_cc/Remove-window-name-on-cross-origin-navigation.inc
|
||||
new file mode 100644
|
||||
--- /dev/null
|
||||
@@ -21,16 +34,17 @@ new file mode 100644
|
||||
diff --git a/third_party/blink/renderer/core/loader/document_loader.cc b/third_party/blink/renderer/core/loader/document_loader.cc
|
||||
--- a/third_party/blink/renderer/core/loader/document_loader.cc
|
||||
+++ b/third_party/blink/renderer/core/loader/document_loader.cc
|
||||
@@ -2969,7 +2969,7 @@ void DocumentLoader::CommitNavigation() {
|
||||
@@ -2969,7 +2969,8 @@ void DocumentLoader::CommitNavigation() {
|
||||
// that the name would be nulled and if the name is accessed after we will
|
||||
// fire a UseCounter. If we decide to move forward with this change, we'd
|
||||
// actually clean the name here.
|
||||
- // frame_->tree().setName(g_null_atom);
|
||||
+ frame_->Tree().SetName(g_null_atom);
|
||||
+ if (!previous_window->GetSecurityOrigin()->IsOpaque())
|
||||
+ frame_->Tree().SetName(g_null_atom);
|
||||
frame_->Tree().ExperimentalSetNulledName();
|
||||
}
|
||||
|
||||
@@ -2980,6 +2980,7 @@ void DocumentLoader::CommitNavigation() {
|
||||
@@ -2980,6 +2981,7 @@ void DocumentLoader::CommitNavigation() {
|
||||
// TODO(shuuran): CrossSiteCrossBrowsingContextGroupSetNulledName will just
|
||||
// record the fact that the name would be nulled and if the name is accessed
|
||||
// after we will fire a UseCounter.
|
||||
|
||||
Reference in New Issue
Block a user