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

Issue 2688573002: Allow a unique origin to compare equal to itself

Created:
3 years, 10 months ago by iclelland
Modified:
3 years, 4 months ago
CC:
chromium-reviews
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Allow a unique origin to compare equal to itself. The HTML Same-origin and Same-origin-domain algorithms require that opaque origins can be considered to be equal to each other. See https://html.spec.whatwg.org/multipage/browsers.html#same-origin BUG=

Patch Set 1 #

Patch Set 2 : Update tests #

Total comments: 1

Patch Set 3 : Fix after rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+48 lines, -4 lines) Patch
M url/origin.cc View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M url/origin_unittest.cc View 1 2 4 chunks +45 lines, -4 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 26 (15 generated)
iclelland
+r mkwst -- This still needs a bug#, spec link, and a bit more info ...
3 years, 10 months ago (2017-02-10 05:42:00 UTC) #8
Mike West
LGTM if you flesh out the CL description a bit.
3 years, 10 months ago (2017-02-12 11:23:52 UTC) #11
Marijn Kruisselbrink
drive-by question https://codereview.chromium.org/2688573002/diff/20001/url/origin.cc File url/origin.cc (right): https://codereview.chromium.org/2688573002/diff/20001/url/origin.cc#newcode170 url/origin.cc:170: bool Origin::IsSamePhysicalOriginWith(const Origin& other) const { Shouldn't ...
3 years, 10 months ago (2017-02-23 23:39:18 UTC) #13
Mike West
On 2017/02/23 at 23:39:18, mek wrote: > drive-by question > > https://codereview.chromium.org/2688573002/diff/20001/url/origin.cc > File url/origin.cc ...
3 years, 10 months ago (2017-02-24 07:59:59 UTC) #14
iclelland
On 2017/02/24 07:59:59, Mike West (sloooooow) wrote: > On 2017/02/23 at 23:39:18, mek wrote: > ...
3 years, 10 months ago (2017-02-24 14:13:03 UTC) #15
iclelland
On 2017/02/23 23:39:18, Marijn Kruisselbrink wrote: > drive-by question > > https://codereview.chromium.org/2688573002/diff/20001/url/origin.cc > File url/origin.cc ...
3 years, 10 months ago (2017-02-24 14:16:19 UTC) #16
Mike West
On 2017/02/24 at 14:16:19, iclelland wrote: > I think that the answer is yes, but ...
3 years, 10 months ago (2017-02-24 14:31:07 UTC) #17
jochen (gone - plz use gerrit)
in the implementation in Blink, we say two origins that are unique but the same ...
3 years, 9 months ago (2017-03-10 10:46:33 UTC) #19
Mike West
On 2017/03/10 at 10:46:33, jochen wrote: > in the implementation in Blink, we say two ...
3 years, 9 months ago (2017-03-10 10:50:12 UTC) #20
jochen (gone - plz use gerrit)
On 2017/03/10 at 10:50:12, mkwst wrote: > On 2017/03/10 at 10:46:33, jochen wrote: > > ...
3 years, 9 months ago (2017-03-10 10:55:35 UTC) #21
Marijn Kruisselbrink
3 years, 9 months ago (2017-03-10 19:48:38 UTC) #22
On 2017/03/10 at 10:55:35, jochen wrote:
> On 2017/03/10 at 10:50:12, mkwst wrote:
> > On 2017/03/10 at 10:46:33, jochen wrote:
> > > in the implementation in Blink, we say two origins that are unique but the
same origin object are equal, so this lgtm
> > 
> > I think Ian's question was more specifically about how/whether suborigins
change that calculation. I'm not sure it's possible in our current
implementation for this to happen, but consider two sandboxed `about:blank`
frames that are pushed into `suboriginA` and `suboriginB` respectively. Are
those "equal"? Should they be?
> 
> they wouldn't be equal in anycase, suborigin or not, right, as they're two
distinct frames and so they'll have distinct SecurityOrigin objects.
> 
> the check for suborigins is "both sub-origins are equal" && "regular origin
equality check returns true"

I don't know how suborigins interact with opaque origins, but in general "two
distinct frames" could very well have the same opaque origin (and hopefully same
SecurityOrigin object).

And yeah, as pointed out before, comparing the non-refcounted url::Origin
objects for object identity is pretty meaningless as they are copyable etc. So
something like the before mentioned CL from dcheng is really the only way to
have any hope of meaningful same-opaque-origin comparison in url::Origin.

Powered by Google App Engine
This is Rietveld 408576698