Closed Bug 1555935 Opened 5 years ago Closed 5 years ago

JSObject finalizers should use FreeOp methods to free memory

Categories

(Core :: JavaScript: GC, task, P3)

task

Tracking

()

RESOLVED FIXED
mozilla69
Tracking Status
firefox69 --- fixed

People

(Reporter: jonco, Assigned: jonco)

Details

Attachments

(2 files)

The idea is that finalizers should not call js_delete/js_free but use the delete_/free_ methods on the FreeOp passed to do this. There are a couple of places this happens though.

Fixing these makes it easier for me to find code to update for bug 1395509.

Carrying on from the last patch, there is one place where we use FreeOp unnecessarily when we're not finalizing.

Depends on D33276

Pushed by jcoppeard@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/fdb574e1fca6
Make JSObject finalizers use the FreeOp::delete_/free_ methods r=pbone?
https://hg.mozilla.org/integration/autoland/rev/d361c289aaa9
Remove some unnecessary use of FreeOp where plain old js_delete will do r=pbone?
Status: NEW → ASSIGNED
Pushed by jcoppeard@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/9242f6f35c85
Make JSObject finalizers use the FreeOp::delete_/free_ methods r=pbone
https://hg.mozilla.org/integration/mozilla-inbound/rev/ac87f5dc79e9
Remove some unnecessary use of FreeOp where plain old js_delete will do r=pbone
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla69
Flags: needinfo?(jcoppeard)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: