Bug 192076 - Remove some superfluous code in ContentSecurityPolicy::upgradeInsecureRequestIfNeeded
Summary: Remove some superfluous code in ContentSecurityPolicy::upgradeInsecureRequest...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Rob Buis
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-11-28 06:53 PST by Rob Buis
Modified: 2018-12-28 22:49 PST (History)
7 users (show)

See Also:


Attachments
Patch (1.79 KB, patch)
2018-11-28 07:01 PST, Rob Buis
no flags Details | Formatted Diff | Diff
Patch (1.98 KB, patch)
2018-11-29 00:08 PST, Rob Buis
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rob Buis 2018-11-28 06:53:11 PST
Remove some superfluous code in ContentSecurityPolicy::upgradeInsecureRequestIfNeeded.
Comment 1 Rob Buis 2018-11-28 07:01:10 PST
Created attachment 355870 [details]
Patch
Comment 2 Frédéric Wang (:fredw) 2018-11-28 14:12:14 PST
Comment on attachment 355870 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=355870&action=review

> Source/WebCore/ChangeLog:12
> +

maybe mention the early return at the beginning of the function.

> Source/WebCore/page/csp/ContentSecurityPolicy.cpp:885
> +

unnecessary whitespace change.

> Source/WebCore/page/csp/ContentSecurityPolicy.cpp:-894
> -        return;

I wonder if we want an ASSERT(url.protocolIs("ws")) or ASSERT_NOT_REACHED instead, to prevent potential mistakes if new protocols are added in the future.
Comment 3 Rob Buis 2018-11-29 00:08:14 PST
Created attachment 355984 [details]
Patch
Comment 4 WebKit Commit Bot 2018-11-29 04:34:34 PST
Comment on attachment 355984 [details]
Patch

Clearing flags on attachment: 355984

Committed r238666: <https://trac.webkit.org/changeset/238666>
Comment 5 WebKit Commit Bot 2018-11-29 04:34:35 PST
All reviewed patches have been landed.  Closing bug.
Comment 6 Radar WebKit Bug Importer 2018-11-29 04:35:35 PST
<rdar://problem/46339247>