Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: backport patch that ensures that cookie store is always created #15836

Merged
merged 6 commits into from Nov 29, 2018

Conversation

Projects
None yet
7 participants
@brenca
Copy link
Member

commented Nov 26, 2018

Description of Change

Fixes #15365, but the issue actually affected all cookies. This patch ensures that the cookie store is created properly.

Checklist

  • PR description included and stakeholders cc'd
  • npm test passes
  • PR title follows semantic commit guidelines

Release Notes

Notes: Fixed a bug that made all cookies non persistent.

@brenca brenca added the target/4-0-x label Nov 26, 2018

@brenca brenca requested a review from as a code owner Nov 26, 2018

@deepak1556
Copy link
Member

left a comment

LGTM, would be great to have a test for this. Thanks!

Show resolved Hide resolved patches/common/chromium/ensure_cookie_store.patch Outdated
@brenca

This comment has been minimized.

Copy link
Member Author

commented Nov 26, 2018

@deepak1556 added a test for this

@brenca brenca force-pushed the brenca/cookie-store-backport branch from aacb472 to 3d180a7 Nov 27, 2018

@brenca brenca force-pushed the brenca/cookie-store-backport branch from 3d180a7 to 76baa64 Nov 27, 2018

@@ -259,6 +262,11 @@ void URLRequestContextGetter::NotifyContextShuttingDown(
std::unique_ptr<ResourceContext> resource_context) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);

// todo(brenca): remove once C70 lands
if (url_request_context_ && url_request_context_->cookie_store()) {
url_request_context_->cookie_store()->FlushStore(base::NullCallback());

This comment has been minimized.

Copy link
@deepak1556

deepak1556 Nov 28, 2018

Member

Is this necessary ? I was able to confirm that cookies are persisted without any external flushing. My test scenario was, from a clean app state.

This comment has been minimized.

Copy link
@brenca

brenca Nov 28, 2018

Author Member

Alright, not sure what's going on here - the test that I added passes without the explicit flush, but the test app I used doesn't keep the cookies. Can you check if this works on your machine? https://gist.github.com/brenca/205ea1876c844b4a6eec58ee735f6537

This comment has been minimized.

Copy link
@deepak1556

deepak1556 Nov 28, 2018

Member

Hmm if the app is quit immediately the cookie is not persisted, must be the persistent db write period https://cs.chromium.org/chromium/src/net/extras/sqlite/sqlite_persistent_cookie_store.cc?l=1277, seems good to have an external flush.

This comment has been minimized.

Copy link
@codebytere

codebytere Nov 29, 2018

Member

@deepak1556 @brenca is this ready to merge or do more changes need to be made?

This comment has been minimized.

Copy link
@deepak1556

deepak1556 Nov 29, 2018

Member

I am good with the current patch, needs to be rebased to fix conflicts before merge.

@ffflorian

This comment has been minimized.

Copy link

commented Nov 29, 2018

Looking forward to this fix! Will this trigger a new beta release? 🙂

@brenca brenca force-pushed the brenca/cookie-store-backport branch from c6f22b4 to 776811c Nov 29, 2018

@ckerr

This comment has been minimized.

Copy link
Member

commented Nov 29, 2018

We're already working on a new beta release, actually. There have been other tooling issues that are holding that up.

@codebytere codebytere merged commit 78b88a7 into master Nov 29, 2018

26 of 28 checks passed

Backportable? - 4-0-x Backport Failed
Details
ci/circleci: linux-x64-testing-tests Your tests failed on CircleCI
Details
Absolute Zero
Artifact Comparison No Changes
Details
Semantic Pull Request ready to be squashed
Details
WIP ready for review
Details
appveyor: win-ia32-debug AppVeyor build succeeded
Details
appveyor: win-ia32-testing AppVeyor build succeeded
Details
appveyor: win-ia32-testing-pr AppVeyor build succeeded
Details
appveyor: win-x64-debug AppVeyor build succeeded
Details
appveyor: win-x64-testing AppVeyor build succeeded
Details
appveyor: win-x64-testing-pr AppVeyor build succeeded
Details
ci/circleci: linux-arm-debug Your tests passed on CircleCI!
Details
ci/circleci: linux-arm-testing Your tests passed on CircleCI!
Details
ci/circleci: linux-arm64-debug Your tests passed on CircleCI!
Details
ci/circleci: linux-arm64-testing Your tests passed on CircleCI!
Details
ci/circleci: linux-checkout Your tests passed on CircleCI!
Details
ci/circleci: linux-ia32-debug Your tests passed on CircleCI!
Details
ci/circleci: linux-ia32-testing Your tests passed on CircleCI!
Details
ci/circleci: linux-ia32-testing-tests Your tests passed on CircleCI!
Details
ci/circleci: linux-x64-debug Your tests passed on CircleCI!
Details
ci/circleci: linux-x64-testing Your tests passed on CircleCI!
Details
electron-arm-testing Build #20181129.19 succeeded
Details
electron-arm64-testing Build #20181129.19 succeeded
Details
electron-lint Build #20181129.11 succeeded
Details
electron-mas-testing Build #20181129.18 succeeded
Details
electron-osx-testing Build #20181129.18 succeeded
Details
release-notes Release notes found
@release-clerk

This comment has been minimized.

Copy link

commented Nov 29, 2018

Release Notes Persisted

Fixed a bug that made all cookies non persistent.

@codebytere codebytere deleted the brenca/cookie-store-backport branch Nov 29, 2018

@trop

This comment has been minimized.

Copy link
Contributor

commented Nov 29, 2018

I was unable to backport this PR to "4-0-x" cleanly;
you will need to perform this backport manually.

@javan

This comment has been minimized.

Copy link
Contributor

commented Nov 30, 2018

Looks like this change didn't make it into v4.0.0-beta.8, correct?

@brenca

This comment has been minimized.

Copy link
Member Author

commented Dec 3, 2018

Yepp, should be in the next beta.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.