Closed Bug 1572782 Opened 4 months ago Closed 4 months ago

Remove js::FreeOp and use JSFreeOp everywhere

Categories

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

task

Tracking

()

RESOLVED FIXED
mozilla70
Tracking Status
firefox70 --- fixed

People

(Reporter: jonco, Assigned: jonco)

Details

Attachments

(4 files)

The 'free op' is a pointer passed to finalizers that acts like a limited context - it allows callers to free memory and update memory accounting for example.

Currently there's a public JSFreeOp base class and the internal implementation js::FreeOp.

The difference between these two causes problems because it means we must use a different type for finalizer functions depending on which you pass, and that causes us to have different types for class definitions (JSClass and js::Class).

This is all unnecessary because the free op is never used by code outside the JS engine. We can make JSFreeOp an opaque pointer in our API and use the full definition internally.

Merge js::FreeOp and JSFreeOp, but alias the former to the latter while we fix uses.

Replace external use of js::FreeOp with JSFreeOp.

Depends on D41410

Sorry for the huge patch. This is pretty much a search and replace of all uses of js::FreeOp.

Depends on D41411

Pushed by jcoppeard@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/11d750555fe1
Remove js::FreeOp and make JSFreeOp opaque in public API r=tcampbell?
https://hg.mozilla.org/integration/autoland/rev/9fd7bea2b512
Remove external references to js::FreeOp r=mccr8?
https://hg.mozilla.org/integration/autoland/rev/8239e4baa0f4
Replace internal use of js::FreeOp with JSFreeOp r=tcampbell?
https://hg.mozilla.org/integration/autoland/rev/ec9d15c69bc8
Remove unused js::FreeOp alias r=tcampbell?
Attachment #9084359 - Attachment description: Bug 1572782 - Remove unused js::FreeOp alias r=tcampbell? → Bug 1572782 - Remove unused js::FreeOp alias and remaining references r=tcampbell?
Pushed by jcoppeard@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/65655ca92cb8
Remove js::FreeOp and make JSFreeOp opaque in public API r=tcampbell?
https://hg.mozilla.org/integration/autoland/rev/c3700a7108e3
Remove external references to js::FreeOp r=mccr8?
https://hg.mozilla.org/integration/autoland/rev/31a82aadb523
Replace internal use of js::FreeOp with JSFreeOp r=tcampbell?
https://hg.mozilla.org/integration/autoland/rev/83f7ef660382
Remove unused js::FreeOp alias and remaining references r=tcampbell?
Flags: needinfo?(jcoppeard)
You need to log in before you can comment on or make changes to this bug.