When an extension calls chrome.cookies.getAll, it will enter the CookiesGetAllFunction::Run function. Inside the function, depending on whether a URL is set, it will either call GetAllCookiesFromManager or GetCookieListFromManager. When the API is called with the parameters chrome.cookies.getAll({url: "https://havanalogin.taobao.com", partitionKey: {}}), because the URL is not null, it ultimately calls GetCookieListFromManager. After being processed through mojom, it calls CookieMonster::GetCookieListWithOptions, and the execution flow is then passed to CookiesGetAllFunction::GetCookieListCallback. Up to this point, everything is as expected.
However, the error occurs afterward.
Within AppendMatchingCookiesFromCookieAccessResultListToVector, when calling AppendCookieToVectorIfMatchAndHasHostPermission, the object constructed with the partitionkey parameter passed when calling this API is not used. Instead, the default constructor for CookiePartitionKeyCollection is utilized! This is the root cause of the erroneous behavior!
--
You received this message because you are subscribed to the Google Groups "Chromium Extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/ec4c07b3-5310-409a-9d13-08cb8b66ed72n%40chromium.org.