Skip to content

Commit 9beb6e5

Browse files
committed
Nullify window.name on cross-site navigation
1 parent abef2bb commit 9beb6e5

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/* Copyright (c) 2022 The Brave Authors. All rights reserved.
2+
* This Source Code Form is subject to the terms of the Mozilla Public
3+
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
4+
* You can obtain one at http://mozilla.org/MPL/2.0/. */
5+
6+
#include "third_party/blink/renderer/core/page/frame_tree.h"
7+
8+
#define CrossSiteCrossBrowsingContextGroupSetNulledName \
9+
CrossSiteCrossBrowsingContextGroupSetNulledName_ChromiumImpl
10+
11+
#include "src/third_party/blink/renderer/core/page/frame_tree.cc"
12+
13+
#undef CrossSiteCrossBrowsingContextGroupSetNulledName
14+
15+
namespace blink {
16+
17+
void FrameTree::CrossSiteCrossBrowsingContextGroupSetNulledName() {
18+
LOG(ERROR) << "1";
19+
SetName(g_null_atom, kReplicate);
20+
CrossSiteCrossBrowsingContextGroupSetNulledName_ChromiumImpl();
21+
}
22+
23+
} // namespace blink
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/* Copyright (c) 2022 The Brave Authors. All rights reserved.
2+
* This Source Code Form is subject to the terms of the Mozilla Public
3+
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
4+
* You can obtain one at http://mozilla.org/MPL/2.0/. */
5+
6+
#ifndef BRAVE_CHROMIUM_SRC_THIRD_PARTY_BLINK_RENDERER_CORE_PAGE_FRAME_TREE_H_
7+
#define BRAVE_CHROMIUM_SRC_THIRD_PARTY_BLINK_RENDERER_CORE_PAGE_FRAME_TREE_H_
8+
9+
#define CrossSiteCrossBrowsingContextGroupSetNulledName \
10+
CrossSiteCrossBrowsingContextGroupSetNulledName_ChromiumImpl(); \
11+
void CrossSiteCrossBrowsingContextGroupSetNulledName
12+
13+
#include "src/third_party/blink/renderer/core/page/frame_tree.h"
14+
15+
#undef CrossSiteCrossBrowsingContextGroupSetNulledName
16+
17+
#endif // BRAVE_CHROMIUM_SRC_THIRD_PARTY_BLINK_RENDERER_CORE_PAGE_FRAME_TREE_H_

0 commit comments

Comments
 (0)