Skip to content

Commit

Permalink
Add some CHECKs for crbug.com/1336617
Browse files Browse the repository at this point in the history
  • Loading branch information
d0iasm authored and Chromium LUCI CQ committed Aug 8, 2022
1 parent 8416e85 commit d86d61a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
Expand Up @@ -954,6 +954,10 @@ base::Value HostContentSettingsMap::GetContentSettingValueAndPatterns(
ContentSettingsPattern* primary_pattern,
ContentSettingsPattern* secondary_pattern,
content_settings::SessionModel* session_model) {
// TODO(crbug.com/1336617): Remove this check once we figure out what is
// wrong.
CHECK(provider);

if (include_incognito) {
// Check incognito-only specific settings. It's essential that the
// |RuleIterator| gets out of scope before we get a rule iterator for the
Expand Down
5 changes: 5 additions & 0 deletions components/embedder_support/content_settings_utils.cc
Expand Up @@ -8,6 +8,7 @@
#include "components/content_settings/core/browser/cookie_settings.h"
#include "components/content_settings/core/common/content_settings.h"
#include "components/content_settings/core/common/content_settings_utils.h"
#include "content/public/browser/browser_thread.h"
#include "net/cookies/site_for_cookies.h"
#include "url/gurl.h"
#include "url/origin.h"
Expand Down Expand Up @@ -43,6 +44,10 @@ content::AllowServiceWorkerResult AllowServiceWorker(
const absl::optional<url::Origin>& top_frame_origin,
const content_settings::CookieSettings* cookie_settings,
const HostContentSettingsMap* settings_map) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
// TODO(crbug.com/1336617): Remove this check once we figure out what is
// wrong.
DCHECK(settings_map);
GURL first_party_url = top_frame_origin ? top_frame_origin->GetURL() : GURL();
// Check if JavaScript is allowed.
content_settings::SettingInfo info;
Expand Down
1 change: 1 addition & 0 deletions weblayer/browser/content_browser_client_impl.cc
Expand Up @@ -336,6 +336,7 @@ content::AllowServiceWorkerResult ContentBrowserClientImpl::AllowServiceWorker(
const absl::optional<url::Origin>& top_frame_origin,
const GURL& script_url,
content::BrowserContext* context) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
return embedder_support::AllowServiceWorker(
scope, site_for_cookies, top_frame_origin,
CookieSettingsFactory::GetForBrowserContext(context).get(),
Expand Down

0 comments on commit d86d61a

Please sign in to comment.