Skip to content

Conversation

@bohrium272
Copy link

@bohrium272 bohrium272 commented Mar 6, 2024

GCD response for GetDOMStorageItems with a 2D array [[key1, value1], [key2, value2]].
This PR changes the type of Entries to [][]string to properly parse this response.

Example:

{
    "command":"DOMStorage.getDOMStorageItems",
    "parameters":{"storageId":{"isLocalStorage":false,"securityOrigin":"https://www.amazon.in"}}
}
{
    "entries": [
        [
            "eelsts",
            "scs"
        ],
        [
            "csmtid",
            "value"
        ],
        [
            "JGKC80APHCXPRJ30YCYC",
            "1"
        ],
        [
            "CSM_previousURL",
            "https://www.amazon.in/"
        ]
    ]
}

@camswords
Copy link
Collaborator

@bohrium272, the file changed will be overwritten after ./v2/gcdapigen/build.sh is run. This command regenerates the gcdapi folder based on the downloaded protocol.json file.

getDOMStorageItems in the protocol.json looks correct, it returns an array where each element is an Item. An Item is an array of strings. It seems the gcdapigen.go isn't creating the correct return type given this information.

@camswords
Copy link
Collaborator

Closing in preference to #74.

@camswords camswords closed this Mar 18, 2024
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.

2 participants