Skip to content

Commit

Permalink
Use GetSecurityOrigin
Browse files Browse the repository at this point in the history
  • Loading branch information
spylogsster committed Apr 12, 2023
1 parent edf39ee commit 237bffd
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,9 @@ bool BraveContentSettingsAgentImpl::AllowScriptFromSource(
// executing the frame (which most, but not all, of the time will just be from
// document.location
if (secondary_url.SchemeIs(url::kDataScheme)) {
secondary_url = render_frame()->GetWebFrame()->GetDocument().Url();
secondary_url =
url::Origin(render_frame()->GetWebFrame()->GetSecurityOrigin())
.GetURL();
}
bool allow = ContentSettingsAgentImpl::AllowScriptFromSource(
enabled_per_settings, script_url);
Expand Down

0 comments on commit 237bffd

Please sign in to comment.