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 CacheExpiration / IndexedDB OpenCursor for Edge #1510

Merged

Conversation

josephliccini
Copy link
Contributor

Prior to filing a PR, please:

  • open an issue to discuss your proposed change.
  • ensure that gulp lint test passes locally.

R: @jeffposnick @philipwalton

Fixes #1509

Edge Browser does not support undefined arguments being passed into openCursor(...)

I handle each case for the arguments to openCursor(...)

See https://developer.mozilla.org/en-US/docs/Web/API/IDBObjectStore/openCursor for more information on the API itself.

This will fix the CacheExpiration logic in Edge Browsers that depend on openCursor(...) in the expiration entry lookup process.

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here (e.g. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

@josephliccini josephliccini changed the title Josephliccini/edge indexeddb Fix CacheExpiration / IndexedDB OpenCursor for Edge Jun 1, 2018
@josephliccini
Copy link
Contributor Author

Things seem to be working in browsers, but the Mock library used doesn't like null. I filed an issue on them, and am also discussing with Edge best approach here with undefineds

@jeffposnick jeffposnick requested a review from philipwalton June 4, 2018 15:14
@philipwalton
Copy link
Member

I'm fine with these changes. In fact, the version of the DBWrapper code that we were discussing releasing separately has these exact changes (since I noticed this was failing in IE), and I was planning to upstream them.

As for the mock library, did that issue get addressed? Can you link to it? I think we're already using a fork of that anyway, so we could potentially fix it in the fork if there's no response from the maintainer.

@josephliccini
Copy link
Contributor Author

Hi @philipwalton !

Thanks for taking a look at this!

Here's the mock library issue: dhoulb/shelving-mock-indexeddb#6

I can submit a CR to them or to your fork with the fix.

@philipwalton
Copy link
Member

If you submit a PR to https://github.com/philipwalton/shelving-mock-indexeddb I'll merge it while we wait on the master repo.

@josephliccini
Copy link
Contributor Author

@philipwalton here it is: philipwalton/shelving-mock-indexeddb#2

Thanks!

@philipwalton
Copy link
Member

Thanks @josephliccini. The mock library has been updated, so these tests should hopefully pass now. Can you make sure to sign the CLA (as described in #1510 (comment)) so we can merge this?

@coveralls
Copy link

coveralls commented Jun 14, 2018

Coverage Status

Coverage increased (+0.02%) to 86.532% when pulling 2fb80c9 on josephliccini:josephliccini/edge-indexeddb into d95348b on GoogleChrome:master.

@josephliccini
Copy link
Contributor Author

Awesome, will do! Just checking internally if there's any extra process for CLA I need to be aware of.

@josephliccini
Copy link
Contributor Author

Just working through the internal process here, hopefully it won't take too much longer. Thanks for being patient

@josephliccini
Copy link
Contributor Author

I signed it!

@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and have the pull request author add another comment and the bot will run again. If the bot doesn't comment, it means it doesn't think anything has changed.

@josephliccini josephliccini force-pushed the josephliccini/edge-indexeddb branch from 058d4b3 to 2fb80c9 Compare July 10, 2018 23:51
@googlebot
Copy link

CLAs look good, thanks!

@josephliccini
Copy link
Contributor Author

Turns out it's OK for me to just sign the individual CLA. (I double checked, it took some time).

Should be good to go!

@jeffposnick
Copy link
Contributor

Thanks again, @josephliccini! We'll get this into the next Workbox release.

@jeffposnick jeffposnick merged commit 27b8f38 into GoogleChrome:master Jul 11, 2018
@philipwalton philipwalton mentioned this pull request Oct 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cache Expiration Logic not running in Edge due to exceptions with running 'openCursor'
5 participants