Open Bug 1308447 Opened 4 years ago Updated 6 months ago

Use mozStorageConnectionUtils and IncrementalVacuumConnection in dom/cache

Categories

(Core :: DOM: Service Workers, defect, P3)

defect

Tracking

()

People

(Reporter: ferjm, Unassigned)

References

(Depends on 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

Bug 1217544 moves storage related code shared by dom/cache and dom/backgroundsync to storage/mozStorageConnectionUtils* and storage/IncrementalVacuumConnection*. This bug is to make use of this shared code in dom/cache.
Assignee: nobody → ferjmoreno
Depends on: 1217544
Attached patch v1 (obsolete) — Splinter Review
Attached patch v1Splinter Review
Attachment #8800385 - Attachment is obsolete: true
Attachment #8832160 - Flags: review?(bkelly)
Comment on attachment 8832160 [details] [diff] [review]
v1

Review of attachment 8832160 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks!  r=me with comments addressed.

::: dom/cache/DBSchema.cpp
@@ +388,5 @@
>  {
>    MOZ_ASSERT(!NS_IsMainThread());
>    MOZ_DIAGNOSTIC_ASSERT(aConn);
>  
> +  nsTArray<nsCString> tablesSql;

These can be AutoTArray<> with the correct number of expected elements.

::: dom/cache/DBSchema.h
@@ +126,5 @@
> +// Grow the database in chunks to reduce fragmentation
> +const uint32_t kGrowthSize = 32 * 1024;
> +const uint32_t kGrowthPages = kGrowthSize / kPageSize;
> +static_assert(kGrowthSize % kPageSize == 0,
> +              "Growth size must be multiple of page size");

Why is this stuff in the header?  It seems like it should live in DBSchema.cpp.  AFAICT only kMaxFreePages is used in another file.
Attachment #8832160 - Flags: review?(bkelly) → review+
Priority: -- → P3
Assignee: ferjmoreno → nobody
You need to log in before you can comment on or make changes to this bug.