Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(33)

Issue 2417883002: Avoid initializing a SecurityOrigin from a KURL for isSecure() check. (Closed)

Created:
4 years, 2 months ago by Charlie Harrison
Modified:
4 years, 2 months ago
Reviewers:
Mike West
CC:
chromium-reviews, blink-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Avoid initializing a SecurityOrigin from a KURL for isSecure() check. Initializing a SecurityOrigin is not cheap. We should avoid it where possible. Initialization causes - Looking up the origin in a map (blobs) - FastMalloc the origin - Many calls to StringImpl::lower() which causes allocation - HashMap lookups for e.g. shouldTreatURLSchemeAsLocal This saves ~1% overhead off of resource requesting. BUG=348655 Committed: https://crrev.com/616c7df79bbc2d892ecee0305dff57a0faaf80a2 Cr-Commit-Position: refs/heads/master@{#425946}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+9 lines, -2 lines) Patch
M third_party/WebKit/Source/platform/weborigin/SecurityOrigin.cpp View 1 chunk +1 line, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/weborigin/SecurityPolicy.h View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/weborigin/SecurityPolicy.cpp View 1 chunk +7 lines, -0 lines 0 comments Download

Messages

Total messages: 14 (7 generated)
Charlie Harrison
Hi Mike, Apologies for the CL bombardment. This one is a bit strange as it ...
4 years, 2 months ago (2016-10-13 17:34:22 UTC) #4
Charlie Harrison
Note: if this CL and the other one checking for whitelisted trustworthiness land, the only ...
4 years, 2 months ago (2016-10-13 17:38:38 UTC) #5
Mike West
On 2016/10/13 at 17:34:22, csharrison wrote: > Hi Mike, > Apologies for the CL bombardment. ...
4 years, 2 months ago (2016-10-18 10:03:13 UTC) #8
Charlie Harrison
Yeah I came to the same conclusion. We could also expose a bool member "hasWhitelistedOrigins" ...
4 years, 2 months ago (2016-10-18 12:21:40 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2417883002/1
4 years, 2 months ago (2016-10-18 12:22:28 UTC) #11
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 2 months ago (2016-10-18 13:46:19 UTC) #12
commit-bot: I haz the power
4 years, 2 months ago (2016-10-18 13:48:25 UTC) #14
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/616c7df79bbc2d892ecee0305dff57a0faaf80a2
Cr-Commit-Position: refs/heads/master@{#425946}

Powered by Google App Engine
This is Rietveld 408576698