Closed Bug 1565720 Opened 5 years ago Closed 5 years ago

Modernize C++ in MemoryMetrics

Categories

(Core :: JavaScript Engine, task, P3)

task

Tracking

()

RESOLVED FIXED
mozilla70
Tracking Status
firefox70 --- fixed

People

(Reporter: tcampbell, Assigned: tcampbell)

Details

Attachments

(5 files, 1 obsolete file)

The js/MemoryMetrics.h source has a lot of boilerplate which makes it unpleasant to work with, which isn't ideal because we occasionally care about memory.

Add extra semi-colons to avoid confusing clang-format.

Replace HashMap<T>* with Maybe<HashMap<T>> in memory reporting to have
simpler code and better ergonimics.

Depends on D37943

Also use default constructors when possible to remove duplications.

Depends on D37944

Avoid manual allocations and use default constructors when possible to
simplify code.

Depends on D37945

Keywords: leave-open
Pushed by tcampbell@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/3850bfc52efa
Fix formatting in MemoryMetrics.h. r=jwalden
https://hg.mozilla.org/integration/autoland/rev/4eb6e5a6ee76
Use Maybe instead of manual allocations in MemoryMetrics.h. r=jwalden
https://hg.mozilla.org/integration/autoland/rev/60a7a843fa24
Use field initializers in MemoryMetrics.h. r=jwalden
Attachment #9079022 - Attachment is obsolete: true
Pushed by tcampbell@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/acaf7e2a87ff
More field initializers fixes in MemoryMetrics.h. r=jwalden
Pushed by tcampbell@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/98911d51b118
Use UniqueChars in MemoryMetrics.{cpp,h}. r=jwalden,froydnj
Keywords: leave-open
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: