Commit 343955c1 authored by Nate Chapin's avatar Nate Chapin Committed by Commit Bot

Handle null GetExecutionContext() in LinkStyle::Process

Bug: 1139708
Test: http/tests/misc/favicon-link-in-detached-frame.html
Change-Id: Ie6428708a3ea3dd80abad835deff189deeeedb28
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2504577
Commit-Queue: Kentaro Hara <haraken@chromium.org>
Auto-Submit: Nate Chapin <japhet@chromium.org>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#821736}
parent bc42696a
......@@ -335,6 +335,8 @@ void LinkStyle::Process() {
params.href.IsValid() && !params.href.IsEmpty()) {
if (!owner_->ShouldLoadLink())
return;
if (!GetExecutionContext())
return;
if (!GetExecutionContext()->GetSecurityOrigin()->CanDisplay(params.href))
return;
if (!GetExecutionContext()
......
<body>
<link rel="icon stylesheet" href="foo"></link>
<iframe id="i"></iframe>
<script>
if (window.testRunner)
testRunner.dumpAsText();
i.contentDocument.documentElement.appendChild(document.body);
console.log("PASS if no crash.");
</script>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment