Page MenuHomePhabricator

[web] implement function to clear database content
ClosedPublic

Authored by kamil on Jul 25 2023, 2:01 AM.
Tags
None
Referenced Files
F2157203: D8611.id29124.diff
Mon, Jul 1, 1:23 AM
F2157202: D8611.id29117.diff
Mon, Jul 1, 1:23 AM
F2157201: D8611.id28999.diff
Mon, Jul 1, 1:23 AM
F2157175: D8611.diff
Mon, Jul 1, 1:19 AM
Unknown Object (File)
Fri, Jun 28, 12:51 AM
Unknown Object (File)
Tue, Jun 25, 6:18 PM
Unknown Object (File)
Tue, Jun 25, 11:39 AM
Unknown Object (File)
Mon, Jun 24, 4:19 PM
Subscribers

Details

Summary

Sometimes we might want to manually delete file and destruct object in runtime. Otherwise, Emscripten will use reference counting to destruct objects.

Depends on D8553

Test Plan

Tests in D8558.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kamil held this revision as a draft.
kamil published this revision for review.Jul 25 2023, 2:18 AM
kamil added inline comments.
web/database/utils/db-utils.js
20–21 ↗(On Diff #28999)

I think this order is better to first take off the lock from the file by destructing the class which is using it, then delete it.

The entire API is synchronous so should be safe.

This revision is now accepted and ready to land.Jul 25 2023, 6:16 AM