HomePhabricator
Diffusion Comm c175e1714d27

[sqlite] Implement processing thread activity on web worker

Description

[sqlite] Implement processing thread activity on web worker

Summary:
This code introduces the thread activity store sqlite ops to web worker

Depends on D11614

Test Plan:
Ran the following code on web and confirmed the results:

await sharedWorker.schedule({
  type: workerRequestMessageTypes.PROCESS_STORE_OPERATIONS,
  storeOperations: {
    threadActivityStoreOperations: [
      {
        type: 'replace_thread_activity_entry',
        payload: {
          id: 'worker_test_A_id',
          threadActivityStoreEntry: JSON.stringify({
            lastNavigatedTo: 1,
            lastPruned: 2,
          }),
        },
      },
      {
        type: 'replace_thread_activity_entry',
        payload: {
          id: 'worker_test_B_id',
          threadActivityStoreEntry: JSON.stringify({
            lastNavigatedTo: 3,
            lastPruned: 4,
          }),
        },
      },
      {
        type: 'remove_thread_activity_entries',
        payload: {
          ids: ['worker_test_B_id'],
        },
      },
    ],
  },
});

Screenshot 2024-04-09 at 4.09.11 PM.png (1×1 px, 263 KB)

Reviewers: atul, kamil

Reviewed By: kamil

Subscribers: ashoat, tomek

Differential Revision: https://phab.comm.dev/D11615

Details

Provenance
willAuthored on Tue, Apr 9, 1:01 PM
Reviewer
kamil
Differential Revision
D11615: [sqlite] Implement processing thread activity on web worker
Parents
rCOMM9567929ea151: [sqlite] Implement C++ code for native to get sqlite thread activity entries
Branches
Unknown
Tags
Unknown