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

Issue 2354083002: Avoid crash in ContentSettingsObserver::GetOriginOrURL with top remote frames. (Closed)

Created:
4 years, 3 months ago by alexmos
Modified:
4 years, 3 months ago
Reviewers:
Lei Zhang, Charlie Reis
CC:
chromium-reviews, site-isolation-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Avoid crash in ContentSettingsObserver::GetOriginOrURL with top remote frames. The intent of the fallback to top()->document().url() in GetOriginOrURL() is to support file path matching for content setting exceptions in pages loaded from a file: scheme. This fallback can cause crashes in OOPIF modes when the top frame is remote, even in cases that have nothing to do with file: exceptions, such as a sandboxed main frame (which has a "null" origin) embedding an OOPIF. Longer-term, local and remote frames should be treated the same way for content settings exceptions for the file: scheme; and content settings will be refactored to be based on origins rather than GURLs in issue 621724. In the short term though, avoid the crash by falling back to document->url() only for local top frames. This shouldn't actually affect file exceptions, as --isolate-extensions, which is the only OOPIF mode currently enabled by default on trunk, won't put subframes inside file: pages into a separate process. BUG=628759, 466297 Committed: https://crrev.com/78aed40a1509c6cab064f9684e9653b37daff826 Cr-Commit-Position: refs/heads/master@{#419899}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -2 lines) Patch
M chrome/renderer/content_settings_observer.cc View 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 19 (11 generated)
alexmos
Charlie, what do you think? Ideally, this would use the origin for both local and ...
4 years, 3 months ago (2016-09-20 20:51:37 UTC) #6
Charlie Reis
LGTM. On 2016/09/20 20:51:37, alexmos wrote: > Charlie, what do you think? > > Ideally, ...
4 years, 3 months ago (2016-09-20 22:25:22 UTC) #10
alexmos
Thanks! On 2016/09/20 22:25:22, Charlie Reis (slow) wrote: > LGTM. > > On 2016/09/20 20:51:37, ...
4 years, 3 months ago (2016-09-20 22:39:57 UTC) #11
alexmos
thestig@: can you please review for OWNERS?
4 years, 3 months ago (2016-09-20 22:43:04 UTC) #13
Lei Zhang
lgtm
4 years, 3 months ago (2016-09-20 23:39:05 UTC) #14
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/2354083002/1
4 years, 3 months ago (2016-09-20 23:46:05 UTC) #16
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 3 months ago (2016-09-20 23:52:23 UTC) #17
commit-bot: I haz the power
4 years, 3 months ago (2016-09-20 23:55:01 UTC) #19
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/78aed40a1509c6cab064f9684e9653b37daff826
Cr-Commit-Position: refs/heads/master@{#419899}

Powered by Google App Engine
This is Rietveld 408576698