Bug 1622500 Comment 7 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

Responded on Phabricator, copying it here: 

From what I can see you also need to update `get cookieStoreId` here: https://searchfox.org/mozilla-central/source/mobile/android/components/extensions/ext-utils.js#319-321

GeckoView uses a different attribute than Desktop, so the current implementation does not work. We set an attribute called `geckoViewSessionContextId`, so the implenetion of `get cookieStoreId` should read that instead, e.g. `this.browser.getAttribute("geckoViewSessionContextId")` should give you the right value, except...

There's an extra step, for safety we transform the id a bit to make it safe, see here: https://searchfox.org/mozilla-central/rev/446160560bf32ebf4cb7c4e25d7386ee22667255/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/StorageController.java#186-201 basically we append the string "gvctx" to the bytes hex representation of the string. To get the id that the extension is passed in we need to do the reverse transformation before returning it in the method above.

We can also chat about this on zoom/matrix if it makes it easier :)
Responded on Phabricator, copying it here: 

From what I can see you also need to update `get cookieStoreId` here: https://searchfox.org/mozilla-central/source/mobile/android/components/extensions/ext-utils.js#319-321

GeckoView uses a different attribute than Desktop, so the current implementation does not work. We set an attribute called `geckoViewSessionContextId`, so the implenetion of `get cookieStoreId` should read that instead, e.g. `this.browser.getAttribute("geckoViewSessionContextId")` should give you the right value, except...

There's an extra step, for safety we transform the id a bit, see here: https://searchfox.org/mozilla-central/rev/446160560bf32ebf4cb7c4e25d7386ee22667255/mobile/android/geckoview/src/main/java/org/mozilla/geckoview/StorageController.java#186-201 basically we append the string "gvctx" to the bytes hex representation of the string. To get the id that the extension is passed in we need to do the reverse transformation before returning it in the method above.

We can also chat about this on zoom/matrix if it makes it easier :)

Back to Bug 1622500 Comment 7