Skip to content

Commit

Permalink
4881091: Add debug info about owner document's origin when inheriting
Browse files Browse the repository at this point in the history
  • Loading branch information
VerteDinde committed Sep 25, 2023
1 parent 0287c4e commit c0c10d3
Showing 1 changed file with 9 additions and 9 deletions.
Expand Up @@ -40,7 +40,7 @@ index a33c756df6452d826456b960e6c01defec01f5fa..835371453953b8058e6e63070d3a2ce5
// origin of |common_params.url| and/or |common_params.initiator_origin|.
return std::make_pair(
diff --git a/third_party/blink/renderer/core/loader/document_loader.cc b/third_party/blink/renderer/core/loader/document_loader.cc
index 19147a610d752996d2749a047648f69761975a48..d0d249274191a5f4f23d8c6837ddcbdea6d73696 100644
index 19147a610d752996d2749a047648f69761975a48..31a547a41716434160d874cc2ccbddbfc20a4b97 100644
--- a/third_party/blink/renderer/core/loader/document_loader.cc
+++ b/third_party/blink/renderer/core/loader/document_loader.cc
@@ -2043,6 +2043,10 @@ Frame* DocumentLoader::CalculateOwnerFrame() {
Expand All @@ -54,14 +54,14 @@ index 19147a610d752996d2749a047648f69761975a48..d0d249274191a5f4f23d8c6837ddcbde
StringBuilder debug_info_builder;
if (origin_to_commit_) {
// Origin to commit is specified by the browser process, it must be taken
@@ -2052,6 +2056,10 @@ scoped_refptr<SecurityOrigin> DocumentLoader::CalculateOrigin(
CHECK(origin_to_commit_->IsOpaque());
origin = origin_to_commit_;
debug_info_builder.Append("use_origin_to_commit");
@@ -2059,6 +2063,10 @@ scoped_refptr<SecurityOrigin> DocumentLoader::CalculateOrigin(
auto* owner_context = frame_->PagePopupOwner()->GetExecutionContext();
origin = owner_context->GetSecurityOrigin()->IsolatedCopy();
debug_info_builder.Append("use_popup_owner_origin");
+ } else if (!SecurityOrigin::ShouldUseInnerURL(url_) &&
+ !is_standard) {
+ origin_calculation_debug_info_ = AtomicString("use_url_with_non_standard_scheme");
+ debug_info_builder.Append("use_url_with_non_standard_scheme");
+ origin = SecurityOrigin::Create(url_);
} else if (IsPagePopupRunningInWebTest(frame_)) {
// If we are a page popup in LayoutTests ensure we use the popup
// owner's security origin so the tests can possibly access the
} else if (owner_document && owner_document->domWindow()) {
// Prefer taking `origin` from `owner_document` if one is available - this
// will correctly inherit/alias `SecurityOrigin::domain_` from the

0 comments on commit c0c10d3

Please sign in to comment.